Skip to content

Conversation

@RossBrunton
Copy link
Contributor

No description provided.

@RossBrunton
Copy link
Contributor Author

This was from oneapi-src/unified-runtime#1176 . It flagged up some issues in LLVM which needed to be fixed (which they have now been).

@RossBrunton RossBrunton force-pushed the ross/clhandles branch 2 times, most recently from 68d37bb to 6a7908a Compare March 25, 2025 16:40
@RossBrunton RossBrunton marked this pull request as ready for review March 26, 2025 11:17
@RossBrunton RossBrunton requested review from a team as code owners March 26, 2025 11:17
Copy link
Contributor

@aarongreig aarongreig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good, just a couple more points

@RossBrunton
Copy link
Contributor Author

@intel/llvm-reviewers-runtime There are two small fixes to the runtime here:

  • There was an incorrect cast of a UR handle -> CL handle, which is no longer valid.
  • urKernelCreateWithNativeHandle now actively does some validation on OpenCL, so the correct return type needed to be set.

@RossBrunton
Copy link
Contributor Author

@intel/llvm-gatekeepers Please merge.

@kbenzie kbenzie merged commit 42ee42e into intel:sycl Apr 4, 2025
35 of 44 checks passed
kbenzie added a commit that referenced this pull request May 14, 2025
Level Zero is the only backend which has any explicit ownership transfer
controls when creating SYCL objects from native handles.

The CUDA and HIP backends already had the default to not transferring
ownership of native handles.

Up until this patch the OpenCL backend was transferring ownership when
creating with a native handle, when combined with the changes to the
OpenCL adapter in #17572 this caused
crashes in existing workloads which expect to manage ownership of the
OpenCL native handles.

Fixes URT-905.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants