Skip to content

Commit

Permalink
added verification of supported property for out of order command queue
Browse files Browse the repository at this point in the history
  • Loading branch information
shajder committed Dec 6, 2024
1 parent 91d2260 commit 88991c4
Showing 1 changed file with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ int test_external_semaphores_import_export_fd(cl_device_id deviceID,
cl_command_queue defaultQueue,
int num_elements)
{
cl_int err;
cl_int err = CL_SUCCESS;

if (!is_extension_available(deviceID, "cl_khr_external_semaphore"))
{
Expand All @@ -42,6 +42,18 @@ int test_external_semaphores_import_export_fd(cl_device_id deviceID,
return TEST_SKIPPED_ITSELF;
}

cl_command_queue_properties device_props = 0;
err = clGetDeviceInfo(deviceID, CL_DEVICE_QUEUE_PROPERTIES,
sizeof(device_props), &device_props, NULL);
test_error(err, "clGetDeviceInfo for CL_DEVICE_QUEUE_PROPERTIES failed");

if ((device_props & CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE) == 0)
{
log_info("Queue property CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE not "
"supported. Skipping test.\n");
return TEST_SKIPPED_ITSELF;
}

// Obtain pointers to semaphore's API
GET_PFN(deviceID, clCreateSemaphoreWithPropertiesKHR);
GET_PFN(deviceID, clEnqueueSignalSemaphoresKHR);
Expand Down

0 comments on commit 88991c4

Please sign in to comment.