[DNM] Proof-of-Concept: Support for OpenCL/Level-Zero devices through chipStar #8700
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR tries to support OpenCL/Level-Zero devices in CuPy through chipStar, which provides HIP to SPIR-V layer. This could open the door for CuPy to a wider audience, e.g., users of Intel Arc GPUs / Xe Cores (#8054).
For now, this PR is a proof-of-concept (or just for fun on my weekend 😃) and is not intended to be merged as-is to the CuPy's main branch.
I have confirmed the very basic operation (as seen in the
run_chip.pyscript) working under Intel i5-12600K and it's integrated UHD Graphics 770 GPU, using the latest chipStar with pull-request: CHIP-SPV/chipStar#951 merged.although a slight modification to chipStar is neededOpenCL / UHD Graphics 770 output:
OpenCL / CPU output:
I haven't tried Level-Zero backend yet. Also note that many libraries are excluded from the build. hipSOLVER and hipFFT seem supported in chipStar's main branch, so it is worth trying.
Steps to run locally
Assuming you are in the pveleskopglc/chipstar:latest docker image: