Repository navigation
Conversation
Backport the LLVM.jl 10 port from main (#3323) to the 6.2 line, which is the last one that uses GPUCompiler 1.x, so that it works with GPUCompiler 1.23.1 (the 1.x port to LLVM.jl 10). LLVM.jl 10 removed create_function/call_function, so the IR generators for indexing, shared memory, malloc, atomics, assertions, printf, ldg, string pointers and the randn constant tables now use @llvmgenerated and generate_llvmcall. `using LLVM` only exports @dispose, so import the IR and Build vocabularies; accessors and setters become properties, the RNG prologue is positioned with insertion points, and named metadata is created explicitly with get!, which makes the empty pass manager in link_libraries! unnecessary. compile() now inspects and disposes of the IR inside the JuliaContext that owns it. Behavior is otherwise unchanged from 6.2.2: atomics keep their system scope and the ldg helper keeps the caller's index type. Assisted-by: Claude Code (Opus 5.5)
Assisted-by: Claude Code (Opus 5.5)
Member
|
Lots of CI failures? |
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 the LLVM.jl 10 port from main (#3323) to the 6.2 line and releases it as 6.2.3.
Why
6.2 is the last CUDA.jl line that resolves against GPUCompiler 1.x. GPUCompiler 1.23.1 (JuliaGPU/GPUCompiler.jl#989) ports 1.x to LLVM.jl 10 and only allows
LLVM = "10". Enzyme.jl is moving to LLVM.jl 10 while still supporting GPUCompiler 1.x and 2.x (EnzymeAD/Enzyme.jl#3741). Its Buildkite CI tests CUDA with GPUCompiler 1 pinned, which resolves CUDA down to 6.2. Those jobs need a 6.2 release that accepts LLVM.jl 10.6.2.3 is the next patch after 6.2.2, and no newer 6.2.x is registered, so this release doesn't skip any fixes from that line.
Changes
create_function/call_functionwere removed, so the IR generators use@llvmgenerated/generate_llvmcallinstead. That covers indexing, shared memory, malloc, atomics,@cuassert,@cuprintf, ldg,@strptrand the randn constant tables.CUDACoreimportsLLVM.IRandLLVM.Build, and accessors become properties.nvvm-reflect-ftzis created withget!, which drops the empty pass manager.compile()inspects and disposes of the IR inside theJuliaContextthat owns it.@strptrconvert pointers withpointercast!.LLVM = "10"for CUDACore, CUDATools and cuBLAS, andGPUCompiler = "1.23.1"for CUDACore and CUDATools.scopeargument.LLVM.APIconstants (those still work), the IR string templates converted to@llvmgenerated, and the device-IR intrinsic rewrites.Testing
All runs were local, on a Quadro RTX 4000 (sm_75), with LLVM.jl 10.1.1 and GPUCompiler 1.23.1 (commit 65a2831):
test/runtests.jl): 18848 pass, 14 broken, and 20 failures ingpuarrays/broadcasting"mismatched sizes" (+/-throughgeamwith mismatched shapes). Unmodified v6.2.2 with LLVM.jl 9.13.2, GPUCompiler 1.23.0 and the same GPUArrays 11.5.16 fails the same 20, so they predate this PR. They come from a test that GPUArrays 11.5.16 added.core/executioncrashed its worker once during the parallel run. It passes on a rerun on its own (105/105).libraries/cublas: 4378/4378 pass.coretests: 7740 pass, 14 broken, no failures.Depends on
The GPUCompiler 1.23.1 registration, JuliaRegistries/General#171343. Until that merges, CI can't resolve this PR without adding GPUCompiler at commit 65a28315f8518ba87bc64d2c4617f56337984fcf (or
rev="release-1.23").🤖 Generated with Claude Code