Repository navigation
Conversation
Backport of the SPIRVIntrinsics part of "Upgrade to LLVM.jl 10" (#525) to the 0.5 release line. LLVM.jl 10 removed `create_function` and `call_function`, so local memory and printf now generate their IR with `@llvmgenerated` and `generate_llvmcall`, and use properties instead of the removed accessors. `using LLVM` no longer exports the API, so import the IR and Build vocabularies too. The textual `llvmcall`s are left as they are, since they don't depend on LLVM.jl. Local memory keeps 0.5.9's size and alignment computation. Assisted-by: Claude Code (Opus 5.5)
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backports LLVM.jl 10 support to the SPIRVIntrinsics 0.5 line and bumps it to 0.5.10, so that oneAPI.jl 2.6 (the last release line on GPUCompiler 1.x and SPIRVIntrinsics 0.5) can move to LLVM.jl 10. That's needed for Enzyme.jl, which moves to LLVM.jl 10 in EnzymeAD/Enzyme.jl#3741 while still supporting GPUCompiler 1.x through GPUCompiler 1.23.1 (JuliaGPU/GPUCompiler.jl#989, registered in JuliaRegistries/General#171343).
The base branch
release-SPIRVIntrinsics-0.5is a1d84b8. There,lib/intrinsicshas the same tree as the registered 0.5.9 (ad282f32).Changes, following the SPIRVIntrinsics part of #525 (1.2.0):
emit_localmemoryandemit_printfreplace the removedcreate_function/call_functionwith@llvmgenerated/generate_llvmcall. Local memory keeps 0.5.9's size and alignment.LLVM.IRandLLVM.Buildvocabularies.LLVM = "10", version 0.5.10.llvmcalls don't depend on LLVM.jl and are left alone.Testing (no GPU): through oneAPI.jl 2.6.3 (the companion PR), on Julia 1.10 and 1.12 with GPUCompiler 1.23.1 and LLVM.jl 10.1.1.
@printf, atomics and work-item queries compile to SPIR-V that passesspirv-val.br label %topblock and one dead block that are no longer emitted.🤖 Generated with Claude Code