-
Notifications
You must be signed in to change notification settings - Fork 761
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
'named symbol not found' error at runtime in cuda_piKernelCreate if static library with kernel is linked #4307
Comments
Hello, I get also the same issue on the CUDA be, but this is not a limitation of the CUDA back-end. Could you try: https://github.com/Michoumichmich/llvm/commit/e3eb050b73bff24cb8335f84fa6a51f1ebaf05c5.diff, this is barely a temporary workaround to a bug that was introduced by f7ce532 in a pulldown |
Thanks a lot. It saved my day. |
You're welcome! |
It seems to happen on some versions but not others. It happens both on WSL and native Linux, I assumed it was related to GPU driver mismatch with CUDA. perhaps can you make the error info more useful with debugging traces? |
The error is coming from the fact that the names of the generated device object files were changed, but |
So far it is working for me, but I am not using the latest commit (a month old). I am aware that there is a recent bug with nvidia containers influencing WSL (and native Linux), so then these two bugs may not be related. |
Hello @ivorobts can you try compiling with |
This was fixed recently by this PR: If you want to try it note that your SYCL code is missing a #include<CL/sycl.hpp>
using namespace sycl;
void func() {
queue q;
q.submit([&](sycl::handler &h) {
sycl::stream os(1024, 768, h);
h.parallel_for(32, [=](sycl::id<1> i) {
os<<i<<"\n";
});
}).wait_and_throw();
} I'm not entirely sure if it should work without the |
Just as a side note, I double checked with the SYCL 2020 specification and the
|
We believe this issue to be resolved now, so we are closing the ticket, @ivorobts if you continue to see any issue here please feel free to comment and we can re-open the ticket. |
Hi,
I see that it should have been fixed, maybe the lastest build broke it again? |
Re-open the issue to check again. |
I had a look and it is indeed failing again with the most recent build, I was able to track it down to the following commit: I'll look into fixing this again. |
The patch 9838076 changed triple processing so gpu arch could be deducted even without extra `-` so we no longer need to add padding, it also seems like SYCL was inadvertently removed from the branch adding in the bound arch to the triple. So this patch fixes adding the bound arch in the triple when using SYCL, removes leftover triple padding code in the offload deps command. The test was also updated accordingly and it now also checks the triple used for `clang-offload-deps` so that we can hopefully catch mismatch between the two earlier in the future. This fixes intel#4307
The patch 9838076 changed triple processing so gpu arch could be deducted even without extra `-` so we no longer need to add padding, it also seems like SYCL was inadvertently removed from the branch adding in the bound arch to the triple. So this patch fixes adding the bound arch in the triple when using SYCL, removes leftover triple padding code in the offload deps command. The test was also updated accordingly and it now also checks the triple used for `clang-offload-deps` so that we can hopefully catch mismatch between the two earlier in the future. This fixes #4307
A simple example showing the usage of static library with kernel which fails at runtime with CUDA BE:
Here is the content of file sycl_lib.cpp:
and a simple main code:
Compilation of sycl_lib.cpp, static library creation and linking works fine:
The application crashes at runtime with following error:
Note that ahead of time compilation and linking works fine for CPU or Intel GPU devices. This looks like a limitation of CUDA BE.
The text was updated successfully, but these errors were encountered: