-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Enable OpaquePointers on LLVM 15 #49846
Conversation
@nanosoldier |
Your benchmark job has completed - possible performance regressions were detected. A full report can be found here. |
Opaque pointers are a per-context setting, right? It would be nice if the GPU stack can keep working with opaque pointers disabled, as we have a couple of (closed-source) back-ends that haven't been adapted yet. |
If this becomes a flag in GPUCompiler, it would be great to have some API for setting that as well. |
LLVM.jl has a wrapper for the LLVM C API already: https://github.com/maleadt/LLVM.jl/blob/e44c430c4a48225114f217c36b166b85a3fcbe5a/lib/15/libLLVM_h.jl#L602-L604. Now that GPUCompiler create its own contexts for use with Julia, theoretically this should just work, but we should verify. |
5e4e106
to
fca8300
Compare
@nanosoldier |
Your benchmark job has completed - possible performance regressions were detected. A full report can be found here. |
Last time I tried opaque pointers it needed some adjustments on GPUCompiler side: |
I changed this PR so it only turns them on for the JIT and not globally. |
The main problem isn't GPUCompiler, it's the out-of-tree back-ends (SPIR-V translator for oneAPI, the AIR "back-end" for Metal, and NVVM for CUDA). Updating these is going to be a pain regardless, so it shouldn't hold up the migration here. I just was hoping that the next LTS would still support typed pointers, so that we have something to point users to while we're updating back-ends. |
I've been testing this, and it works great. I wonder if we could have the NFC version of this in 1.10, i.e., calling |
fca8300
to
7e89102
Compare
For the record, with #51840 it doesn't matter whether Julia uses opaque pointers or not (LLVM's default is still typed, and Julia doesn't use the clopt anymore allowing GPUCompiler to override per-context). But I've also started work on updating GPUCompiler to opaque pointers in JuliaGPU/GPUCompiler.jl#528. Regardless, it should be fine to flip the switch here. Let's see what else breaks though: @nanosoldier |
The package evaluation job you requested has completed - possible new issues were detected. |
7e89102
to
1f095f0
Compare
Will fix #52363 on for 1.11-dev |
1f095f0
to
64cc21f
Compare
Opaque pointers introduce a bunch of regressions that are only fixed on a patched llvm 16 |
Did it get worse? The results above seemed to look fine |
Unions are on average 50% slower |
Your benchmark job has completed - possible performance regressions were detected. A full report can be found here. |
Superseded by #51720 |
No description provided.