-
Notifications
You must be signed in to change notification settings - Fork 769
Clang crashes since last pulldowns when building shared objects #4294
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
I have been looking at the issue: To Replicate: Setup DPC++
zfp build and run instructions:
Commands to build and run: Error: The kernel throwing the error is in src/sycl_zfp/variable.hpp:
Failing build command (Simplified for readability)
Using -### narrowed down problem to broken llvm-ir code produced after the sycl-post-link pass Broken passes:
Working passes:
From looking at the .bc files it appears that |
That's awesome @AidanBeltonS, thanks a lot! |
Proposed fix: #4409 |
@AidanBeltonS, thanks a lot for the detailed analysis.
@steffenlarsen, FYI. |
@AidanBeltonS Good find! I'm not fully convinced that the fix should be in sycl-post-link rather than the driver, but one thing gave me pause; how old is the DPC++ build you're using? The need for Also, would you mind adding the full output of -###, just so I have the full context? |
Also ping @Naghasan just in case. |
I tested the fix, ZFP builds fine and works now! Thanks again. I'm not sure about the funnel shifter though |
My rational for the fix being in sycl-post-link is that depending on the The output of -### in the above text is with PR #3735 and without PR #4107, this was to simplify the debugging process. I have added the three -### for with PR #4107, PR #3735, and before PR #3735 With 4107
With 3735
Without 3735
|
Okay, I think I understand. Thank you for clarifying. I'll leave it up to those who know the sycl-post-link tool better than I do. |
When using `sycl-post-link` llvm.used should be removed. Otherwise it can cause a crash further on. This patch checks to see if llvm.used is removed and if it is prevents the old code from being reused in the table. This fixes #4294. See issue for more details on problem.
Describe the bug
Since last week I'm experiencing crashes when building SYCL projects. All the crashes happens when linking the SYCL back-end of that library into a shared object.
When targeting the CUDA back-end, I get the following crashes:
I get, when building with
-Og
:And when building for release with
-O2
, the previous error disappear and I get this one instead:On the SPIR-V back-end (
spir64_x86_64
), the use of a right funnel shifter:Results now in the following error:
Replacing the shifter implementation by
return 0
allows the code to compile on the spir-v back-end, and without any of the previously mentioned errors. But the behaviour is obviously wrong.Everything compiles fine with older versions such as 8b56cbb on all the targets.
** Reproducer **
I wasn't able to write a reproducer. I'm compiling with
-fsycl-targets=nvptx64-nvidia-cuda -Xsycl-target-backend=nvptx64-nvidia-cuda --cuda-gpu-arch=sm_75
. I can link the source code with build instructions if needed.Environment:
The text was updated successfully, but these errors were encountered: