Skip to content

Commit

Permalink
Fixed incorrect usage of clGetDeviceIDs num_devices (#1952)
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
paulfradgley and bashbaug authored Jun 25, 2024
1 parent a281046 commit ac69311
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test_conformance/events/test_event_dependencies.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit ac69311

Please sign in to comment.