-
Notifications
You must be signed in to change notification settings - Fork 199
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
Fix external semaphore test when exportability is not supported #2045
Conversation
* Allow get_device_semaphore_handle_types to return CL_SUCCESS for case where implementation returns '0' size for import/export handle type query to indicate that it doesn't support importing/exporting semaphore. * If cl_khr_external_semaphore is reported, add condition to check any of import/export or maybe both are supported. * Current test performs a union rather than intersection of import and export handle types list, perform an intersection to find common handle types.
An implementation may not support exportable semaphore, subtests available as part of cl_khr_external_semaphore assumes support for exportable semaphore, resulting in failure on such implementation. Instead of skipping these test, allow importable semaphore creation for the purpose of testing.
417cd69
to
06f1b0d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note, I didn't try running these changes.
std::vector<cl_external_semaphore_handle_type_khr> | ||
handle_types_query_result(num_handle_types); | ||
err = | ||
clGetDeviceInfo(deviceID, param, | ||
handle_types_query_result.size() | ||
* sizeof(cl_external_semaphore_handle_type_khr), | ||
handle_types_query_result.data(), nullptr); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor: could we read directly into the handle_types
vector here, rather than reading into a temporary vector and then copying?
Merging as discussed in the September 3rd memory subgroup. |
An implementation may not support exportable semaphore, subtests available in cl_khr_external_semaphore assumes support for exportable semaphore, resulting in failure on such implementation. Allow implementations to use importable semaphore in such cases.