-
Notifications
You must be signed in to change notification settings - Fork 768
[SYCL] Integer buffer index in SYCL kernel causes linker crash #2353
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
Comments
Hi @krasznaa, thanks for the report, This might be related to recent activity of enabling some early optimizations (i.e. prior generating SPIR-V). Could you please try to add |
Unfortunately that is probably not it.
It seems that my compiler version (built last week as you can see from the stack trace in the original post 😉) doesn't even know about this flag yet... |
Ah, for one week old compiler you should probably try |
Yepp, your hunch was correct after all...
The linking succeeds if I disable those optimisations. |
Please consider this flag as current workaround for the issue. The main problem is that optimized code generates some new debug metadata which isn't expected by the translator. Tagging @AlexeySotkin and @asavonic here for awareness. I guess that the proper plan would be:
|
FYI: I needed this also for a7ad8b8. |
Ah... by "with a7ad8b8", you mean "with the compiler built from sources at this revision". Is llvm-spirv crash you see also caused by debug metadata translation or some other problem? |
@krasznaa, @vrpascuzzi, we have enhanced the translator with support of new debug info and this issue should disappear |
@krasznaa, @vrpascuzzi, I will close this, because there were no further responses from you for about a year, but if you still experience this or another problem, please let us know |
Sorry for the silence. I have not seen this type of error ever since. So closing the issue was correct. |
[L0] Enable zesInit by default given newer L0 IP version
Dear All,
We bumped into a quite interesting issue with @czangela...
Take the following example function:
(It comes from a piece of code that tries to pair up "some type" of objects, and store in output buffers the indices of the matching pairs.)
If I try to compile this into a shared library, with debug symbols on the shared library, I get:
Note that I used the following
Makefile
for this test:After a fair bit of debugging I found that if I modify the type of
middleIndex
andbottomIndex
in this example fromint
tostd::size_t
, the linking error disappears. (And the original code starts to work.)At first I thought that the compiler was not creating
cl::sycl::id<1>
objects out of theint
indices correctly. But even if I create such objects explicitly from theint
indices, the linking still dies in the same way.So at this point I'd let you guys debug the problem. It is of course okay if we need to use
std::size_t
indices in the kernels explicitly. But it would be helpful if the compiler gave a clear message about it.Also take note that this only happens when building the code in "debug mode". Without the
-g
flag the compilation/linking succeeds. 😕 And it also succeeds when building CUDA binaries. Only the compilation for-fsycl-targets=spir64-unknown-unknown-sycldevice
breaks like this. (As far as I can tell.)Pinging @ivorobts, @fwyzard, @leggett, @vpascuzz.
Cheers,
Attila
The text was updated successfully, but these errors were encountered: