Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added object comparability verification for default device queue #2171

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions test_conformance/api/test_api_consistency.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,28 @@ int test_consistency_device_enqueue(cl_device_id deviceID, cl_context context,
"clSetDefaultDeviceCommandQueue did not return "
"CL_INVALID_OPERATION");
}
else
{
// Device supports a replaceable default On-Device Queue. Change
// default queue and query device to test CL_QUEUE_DEVICE_DEFAULT
// restult object comparability

clCommandQueueWrapper queue =
clCreateCommandQueue(context, deviceID, 0, &error);
test_error(error, "Unable to create command queue to test with");

error = clSetDefaultDeviceCommandQueue(context, deviceID, queue);
test_error(error, "clSetDefaultDeviceCommandQueue failed");

cl_command_queue q = nullptr;
error = clGetCommandQueueInfo(queue, CL_QUEUE_DEVICE_DEFAULT,
sizeof(q), &q, nullptr);
test_error(error, "Unable to query CL_QUEUE_DEVICE_DEFAULT");

test_assert_error(
queue == q,
"Unexpected result returned by CL_QUEUE_DEVICE_DEFAULT query");
}

// If CL_DEVICE_QUEUE_REPLACEABLE_DEFAULT is set,
// CL_DEVICE_QUEUE_SUPPORTED must also be set.
Expand Down
Loading