Skip to content
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

Support for CUDA/HIP on OpenCL/Level0 via chipStar #4504

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ColonelPhantom
Copy link

Very hacky support for chipStar, which is a compiler to run HIP/CUDA on OpenCL/Level Zero (currently fairly Intel focused).

Requires:

Currently only supports building via Makefile, as I didn't yet look at CMake integration for these.

I also wrapped some stuff using unsupported hipBLAS functions in #ifdefs so they won't break the build, and sacrificed use_tensor_cores in the process.

Finally, I changed some local sizes from 1024 to 256 so it can run on my UHD 620 laptop. (I think modern Intel graphics support local sizes of up to 1024, so this isn't strictly necessary for those).

Performance is still much worse than CPU (i5-8350U), but seems a bit better than OpenCL from preliminary testing (not a proper benchmark run). Would love if someone with more powerful Intel hardware could give this a try!

@ColonelPhantom ColonelPhantom changed the title Support for building via chipStar Support for CUDA/HIP on OpenCL/Level0 via chipStar Dec 17, 2023
@Jacoby1218
Copy link

Interested in how this runs on my ARC A770 16GB. There's already another SYCL project as well here: #2690

@ColonelPhantom
Copy link
Author

Yeah, I'm aware of that PR. The advantage of chipStar over dpct is that it works with the same source file, instead of a separate one that has to remain in-sync with the original (unless you want to use SYCL on all platforms).

(Also, chipStar does not use SYCL, it uses the lower-level Level Zero or OpenCL, which are also used by SYCL. It's essentially a compiler from CUDA C++ to SPIR-V, whereas icpx is a compiler from SYCL to SPIR-V.)

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.

2 participants