Fixed incorrect usage of clGetDeviceIDs num_devices (#1952)

clGetDeviceIDs 'num_devices' output parameter is described as:
> num_devices returns the number of OpenCL devices available that match
device_type.

but the _test_events
out_of_order_event_waitlist_multi_queue_multi_device_ test expects that
after calling:
`clGetDeviceIDs(platform, CL_DEVICE_TYPE_ALL, 2, two_device_ids,
&number_returned);`

the content of number_returned needs to be 2, but it should be valid to
return a larger number.

---------

Co-authored-by: Ben Ashbaugh <ben.ashbaugh@intel.com>
This commit is contained in:
paulfradgley
2024-06-25 17:46:49 +01:00
committed by GitHub
parent a281046e0e
commit ac6931198d

View File

@@ -97,7 +97,7 @@ int test_event_enqueue_wait_for_events_run_test(
error = clGetDeviceIDs(platform, CL_DEVICE_TYPE_ALL, 2, two_device_ids,
&number_returned);
test_error(error, "clGetDeviceIDs for CL_DEVICE_TYPE_ALL failed.");
if (number_returned != 2)
if (number_returned < 2)
{
log_info("Failed to obtain two devices. Test can not run.\n");
free(two_device_ids);