-
Notifications
You must be signed in to change notification settings - Fork 787
[SYCL] [CUDA]Add experimental cuda interop #6162
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
Conversation
488747b
to
28621e6
Compare
pi_context *piContext) { | ||
(void)num_devices; | ||
(void)devices; | ||
(void)ownNativeHandle; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't you want to check (also in other places) that unused arguments are either unset, or set to reasonable values?
The changes look good high-level, but can't you split them into multiple PRs? |
I see you are adding tests in KhronosGroup/SYCL-CTS#336 |
What does "experimental" denotes here and when can/will it become non-experimental? |
Sure, I think this can be split into a few PRs. It might be a bit tricky as there may be some dependencies between the different PRs. Would you prefer this to be separated into a few submissions?
I am running the CUDA CTS tests locally to verify this PR passes the SYCL-CTS. I run them when I make changes to either this PR or the CUDA CTS tests.
This is experimental as there is still some discussion regarding the CUDA backend spec. In addition both oneMKL and oneDNN use the exiting interop, if these changes were to overwrite the current interop behaviour both of these libraries would break. |
Yes, please. Even splitting to 2 will make it more manageable.
Please clarify what is the "current interop"? I am not seeing any interop support in the current CUDA Plugin. |
Sure I will work on splitting this up.
Although there is no support in the CUDA plugin for creating SYCL objects with native types, there is functionality to return native types from SYCL objects. The returned native types are being changed by the CUDA backend spec, for example |
Thank you!
I see. I think it would still be better to have a plan from the beginning how the new interop becomes the default and the only one eventually. And, then, how to get it out of the "experimental" envelope. @gmlueck : would you have any suggestions here? |
Since this is an ABI change we cannot reasonably have a deprecation period for the change, so I don't personally see any other option than promoting it out of experimental (replacing the old API) once we are in an ABI break window. Preferably this would happen when the backend specification is deemed fully ready and is implemented in this experimental guard. |
This sounds right. We need to keep track of this change (remove "experimental") needed when ABI break is allowed. Shouldn't we add deprecation messages on the "current" interop now? |
Since the switch is guarded by |
We can only remove old interface after it was deprecated for some time. I think it is OK to tell users that we are moving to the new version, which is currently implemented under |
I'd like to keep this pull request open, we've not been very active on it recently, but we plan to come back to it again soon. |
This pull request is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be automatically closed in 30 days. |
This pull request was closed because it has been stalled for 30 days with no activity. |
This PR adds an experimental CUDA-interop that reflects the proposed CUDA backend spec in KhronosGroup/SYCL-Docs#197. The changes work with the CUDA CTS interop checks KhronosGroup/SYCL-CTS#336.
The changes are kept experimental so as to not break oneMKL, and oneDNN which use CUDA interops.
The experimental interop is enabled by defining the
SYCL_EXT_ONEAPI_BACKEND_CUDA_EXPERIMENTAL
macro and including the header filesycl/ext/oneapi/experimental/backend/cuda.hpp
.