TornadoVM
TornadoVM copied to clipboard
Fixed CL_DEVICE_TYPE_ALL to be a long type to avoid sign extension
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
- [x] OpenCL
- [ ] PTX
- [ ] SPIRV
OS tested
Mark the OS where this PR is tested.
- [x] Linux
- [ ] OSx
- [ ] Windows
Did you check on FPGAs?
If it is applicable, check your changes on FPGAs.
- [ ] Yes
- [x] No
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.
Thank you @coldav . This makes sense. I wish Java has unsigned primitive types.
Pending action is the CLA. It needs to be singed with the same email as the author commit.
Thanks @coldav . We did received the CLA. In order to merge the PR, can you please resolve the conflicting file? Ping me if you have questions.
Awesome! Thank you @coldav . I will merge this PR.