llvm
llvm copied to clipboard
[SYCL] Don't set PI_USM_INDIRECT_ACCESS if platform don't support it
If the OpenCL platform doesn't support USM, don't set PI_USM_INDIRECT_ACCESS exec info. This will avoid SYCL program to fail when they don't use USM. If the program do need USM support, the runtime will fail on other API calls (like memory allocation).
A few points:
- I'm not too sure how to create a test for that, I'm happy to try suggestions if you have any
- another way to do this would be to return 'unsupported' from UR and the SYCL runtime to log it but not fail. I had an offline chat with @kbenzie and he suggested this approach for now
@steffenlarsen After discussion with Beni, I cut the link to the UR patch (will be caught with another bump). So if you are happy you can approve it, no risk to make it point to the wrong repo now :)
@intel/llvm-gatekeepers Ready to merge (failing CI job is unrelated and common to other PRs)