-
Notifications
You must be signed in to change notification settings - Fork 30
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
State of interoperability with cuda backend #947
Comments
Yes, this is documented limitation of Constructing cuda object underlying the kernel-bundle requires cuda, and so should be done outside of dpctl. Once constructed, the interoperability kernel bundle can be represented by |
@fcharras what SYCL runtime are you using? Did you build the open source Intel LLVM SYCL tool chain to try it with dpctl? If there is an interest, the dpctl_sycl_kernel_bundle_interface can be extended to support CUDA as well. For us, the quandary has always been testing and maintaining such an interface will also mean having to build and maintain a dpcpp runtime with CUDA support. |
Yes, I was investigating the potential of interoperability of dpctl / dpnp / numba_dpex. Having the same python code be distributed and run in a hardware agnostic way would be such a good feature. Also from a developer perspective it's important to know early what has the potential to be portable and what hasn't when choosing the libraries to build on. Not only to cuda but also hip/amd so we can target the largest scope of users. If we have working POCs we would also consider CI setups for those backends. From what I've gathered so far, |
@fcharras Thanks for the clarification. The type of interoperability you have in mind has been on my TODO list for a while. Here is the basic outline of how I think the portability/interoperability will work from the perspective of
The bulk of the engineering time IMO will go into the first task of extending the kernel decorator, but it is not intractable. I recently have started to refactor and clean up the The third bullet about packaging and distributing a dpcpp runtime with CUDA support is the next challenge. That needs to be solved as a community effort. |
I will let @oleksandr-pavlyk confirm, but I do think even dpnp can be extended to CUDA. I and Sasha at one point did experiment using the CUDA backend for oneMKL via the dpctl pybind11 interface. We had mixed luck. The real challenge was for some reason at that time oneMKL could not support both CUDA and LevelZero at the same time. You needed to compile the code for one or the other. Things might have changed and improved since then. We have the example code for the oneMKL dpctl interface here: https://github.com/IntelPython/dpctl/tree/master/examples/pybind11/onemkl_gemv |
I opened a separate issue for building dpnp IntelPython/dpnp#1206 About it using And regarding support for building with custom |
@fcharras you are right @oleksandr-pavlyk We should explore what it will take to switch from MKL to oneMKL as that will open up CUDA support. |
Awesome news ! |
DPCTL can now be compiled targeting one of, or all of, CUDA and HIP SYCL targets in addition to SPIR64 SYCL target. This is documented in https://intelpython.github.io/dpctl/latest/beginners_guides/installation.html#building-for-custom-sycl-targets |
dpctl can detect cuda devices:
but
dpctl.program
can't create kernels, onlylevel_zero
andopencl
are supported:Are there plans for further interoperability from dpctl with backends that are not opencl and level_zero ?
The text was updated successfully, but these errors were encountered: