-
Notifications
You must be signed in to change notification settings - Fork 267
LLVM 20 + libLLVMSPIRVLib does not work out of the box #1893
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintain 8000 ers 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
Comments
Note that the SPIR-V version selected by PoCL here disregards what I passed in (SPIR-V IR generated with the translator's executable passing |
I don't know how you came to that conclusion. The code handles up to SPIR-V 1.4 (unless the numeric case values are somehow off).
Yes, but as the code comment a few lines down explains, this is not the case for all existing versions of that header. But anyway this needs to be fixed. |
Yeah, I guess I got confused by the strange case ordering (with the |
@maleadt should be fixed in main, can you retest ? |
Seems to work, thanks! |
I noticed #1809 (cc @franz) but I'm having a hard time switching from the translator executables to a library. I'm using LLVM 20 (with a matching
libLLVMSPIRVLib
for LLVM 20), which supports up to SPIR-V 1.6. However, the logic here only supports up to SPIR-V 1.1:pocl/lib/CL/pocl_llvm_spirv.cc
Lines 136 to 145 in d36663e
Worse, the
TargetVersion
selected by PoCL is SPIR-V 1.5, since I'm using LLVM 20:pocl/lib/CL/devices/common_utils.c
Lines 319 to 321 in d36663e
That means I always get a
CL_INVALID_BINARY Translator does not recognize the SPIR-V version
error.Furthermore,
LLVMSPIRVOpts.h
from the LLVM 20-compatible translator defines enum values up to SPIR-V 1.6, so the following seems to work here:The text was updated successfully, but these errors were encountered: