Fixed CL_DEVICE_TYPE_ALL to be a long type to avoid sign extension #419
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This fixes CL_DEVICE_TYPE_ALL to be passed correctly to OpenCL backend by changing the immediate for CL_DEVICE_TYPE_ALL to be have the suffix 'L' which avoids the sign extension and removes the previous workaround for Codeplay as a backend.
Problem description
CL_DEVICE_TYPE_ALL was not being correctly provided to OpenCL backends. The CL_DEVICE_TYPE_ALL enumeration was coming out as 0xffffffffffffffff rather than 0xffffffff when used with clGetDeviceIDs which was causing some OpenCL backends to fail as it was passing a technically incorrect value.
This can be seen by building Codeplay "host" target - https://github.com/codeplaysoftware/oneapi-construction-kit/blob/main/doc/developer-guide.md#compiling-oneapi-construction-kit
Backend/s tested
OS tested
Mark the OS where this PR is tested.
Did you check on FPGAs?
If it is applicable, check your changes on FPGAs.
How to test the new patch?
Run any test with OpenCL backend chosen and oneAPIConstructionKit built as "host"
Provide instructions about how to test the new patch.