Pass runtime strings in the target's global address space - #920
Conversation
|
I don't particularly like the new interface though, so I'm also going to explore getting this out of LLVM. |
|
I thought we had already tried to fix this before? |
|
https://github.com/JuliaGPU/OpenCL.jl/pull/302/changes We have Edit: Ah I see the issue, we are emitting in AS.Constant, but your intrinsics would like to see AS 0 |
Exception names and backtrace strings are emitted in the target's global
address space, but the runtime declarations used `Ptr{Cchar}` and cast them
to the default address space. For SPIR-V, that does not describe the
cross-workgroup storage containing the strings.
Represent runtime string arguments with a placeholder resolved per compiler
job. Keep `Ptr{Cchar}` as the default and derive SPIR-V's pointer type from
the data layout's global address space, avoiding an address-space cast.
Cover both typed and opaque LLVM pointers and translate the result through
both SPIR-V back-ends.
52d6ccc to
62c0c7b
Compare
Yes. But in the latest version, I made it so that we respecialize the runtime functions on a different type, so they are really accepting AS1 now, i.e., what |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #920 +/- ##
==========================================
+ Coverage 85.14% 85.41% +0.27%
==========================================
Files 29 29
Lines 5566 5582 +16
==========================================
+ Hits 4739 4768 +29
+ Misses 827 814 -13 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Exception names and backtrace strings are emitted in the target's global address space, but the runtime declarations used
Ptr{Cchar}and cast them to the default address space. For SPIR-V, that does not describe the cross-workgroup storage containing the strings.Represent runtime string arguments with a placeholder resolved per compiler job. Keep
Ptr{Cchar}as the default and derive SPIR-V's pointer type from the data layout's global address space, avoiding an address-space cast. Cover both typed and opaque LLVM pointers and translate the result through both SPIR-V back-ends.