llvm icon indicating copy to clipboard operation
llvm copied to clipboard

[SYCL] Don't set PI_USM_INDIRECT_ACCESS if platform don't support it

Open Naghasan opened this issue 2 years ago • 1 comments

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).

Naghasan avatar Feb 21 '24 10:02 Naghasan

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

Naghasan avatar Feb 21 '24 10:02 Naghasan

@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 :)

Naghasan avatar Feb 27 '24 12:02 Naghasan

@intel/llvm-gatekeepers Ready to merge (failing CI job is unrelated and common to other PRs)

Naghasan avatar Feb 27 '24 14:02 Naghasan