Skip to content

[SYCL][CUDA] Add experimental cuda interop with queue #6290

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 15, 2022

Conversation

AidanBeltonS
Copy link
Contributor

This PR is adds part of the CUDA-backend spec interop proposed in KhronosGroup/SYCL-Docs#197. The changes work with the CUDA CTS interop checks KhronosGroup/SYCL-CTS#336.

This PR just adds the queue interop.

llvm-test-suite: intel/llvm-test-suite#1054

"Creation of PI queue from native handle not implemented");
return {};

assert(ownNativeHandle == 1);
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
assert(ownNativeHandle == 1);
assert(ownNativeHandle);

Also, cuda_piextContextCreateWithNativeHandle asserts this parameter to be false. What is the difference here?

Copy link
Contributor Author

@AidanBeltonS AidanBeltonS Jun 13, 2022

Choose a reason for hiding this comment

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

So this should be false for the cuda backend. make_queue was passing this as true due to the level_zero backend defaults to transferring control of the object.
I have fixed this by asserting this parameter to false, and specialising make_queue for the experimental cuda interop.

This change will also need to be made in #6288. I will make the change to that PR if this approach works for you.

@steffenlarsen
Copy link
Contributor

/verify with intel/llvm-test-suite#1054

Copy link
Contributor

@steffenlarsen steffenlarsen left a comment

Choose a reason for hiding this comment

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

LGTM!

@pvchupin pvchupin merged commit 89460e8 into intel:sycl Jun 15, 2022
pvchupin pushed a commit to intel/llvm-test-suite that referenced this pull request Jun 15, 2022
This PR add testing of the CUDA backend experimental queue interop.

It checks that valid types are returned and that the created SYCL objects can be used to do work.
It additionally creates a queue from an already existing sycl queue's native handle and makes sure it and the original work.

Depends on: intel/llvm#6290
@AidanBeltonS AidanBeltonS deleted the cuda_exper_queue branch June 16, 2022 15:28
aelovikov-intel pushed a commit to aelovikov-intel/llvm that referenced this pull request Mar 27, 2023
…t-suite#1054)

This PR add testing of the CUDA backend experimental queue interop.

It checks that valid types are returned and that the created SYCL objects can be used to do work.
It additionally creates a queue from an already existing sycl queue's native handle and makes sure it and the original work.

Depends on: intel#6290
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.

3 participants