-
Notifications
You must be signed in to change notification settings - Fork 751
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
[CUDA] Upstream the SPIR-V translator changes into KhronosGroup/SPIRV-LLVM-Translator #1166
Comments
I've found a bug in this commit, which affects translation from SPIR-V to LLVM IR: some built-in SPIR-V variables translated not into OpenCL built-ins, but into something strange, like: Faulty code is additional lines in the following mapping: llvm/llvm-spirv/lib/SPIRV/OCLUtil.h Lines 594 to 644 in 3b6799a
This map is referenced as: llvm/llvm-spirv/lib/SPIRV/OCLUtil.h Lines 130 to 131 in 3b6799a
And the only use of it is in llvm/llvm-spirv/lib/SPIRV/SPIRVReader.cpp Lines 241 to 254 in 3b6799a
I think it would be better to refactor the whole map, i.e. swap types of key and value. @Alexander-Johnston, @Ruyk, please fix this bug during upstreaming to KhronosGroup/SPIRV-LLVM-Translator |
Unfortunately, my analysis wasn't quite correct: mentioned map is actually used to map from string to built-in id: llvm/llvm-spirv/lib/SPIRV/OCL20ToSPIRV.cpp Lines 1262 to 1263 in 3b6799a
So, it seems that we cannot just remove additional lines with stuff like
|
Also, as quick workaround/hack we just need to modify the mapping: llvm/llvm-spirv/lib/SPIRV/OCLUtil.h Lines 610 to 616 in 3b6799a
By some reason |
Oh yes, that's not really the intention here. I will make sure this doesn't happen for SPIR-V -> LLVM IR |
@AlexeySachkov, @Naghasan, is #1393 resolved this issue? |
Yes, normally #1393 restored the llvm-spirv to upstream |
@AlexeySachkov, I'm closing this issue. |
Continue refactoring from intel#1140, intel#1143, intel#1166
#1091 changed some things in the translator, in particular 09b3b2e.
All these commits were squashed into 7a9a425
We might lose this changes while doing pulldowns from KhronosGroup/SPIRV-LLVM-Translator repo
The text was updated successfully, but these errors were encountered: