Skip to content

[release-6.2] Port to LLVM.jl 10 (GPUCompiler 1.23.1), release 6.2.3 - #3381

Open
vchuravy wants to merge 2 commits into
release-6.2from
vc/release-6.2-llvm10
Open

vchuravy wants to merge 2 commits into
release-6.2from
vc/release-6.2-llvm10

Conversation

@vchuravy

Copy link
Copy Markdown
Member

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

  • Port to LLVM.jl 10. This is the subset of Upgrade to LLVM.jl 10 #3323 that LLVM.jl 10 needs, adapted to 6.2.
    • create_function/call_function were removed, so the IR generators use @llvmgenerated/generate_llvmcall instead. That covers indexing, shared memory, malloc, atomics, @cuassert, @cuprintf, ldg, @strptr and the randn constant tables.
    • CUDACore imports LLVM.IR and LLVM.Build, and accessors become properties.
    • The RNG prologue is positioned with insertion points, and it no longer overwrites the debug location of the kernel's first instruction.
    • nvvm-reflect-ftz is created with get!, which drops the empty pass manager.
    • compile() inspects and disposes of the IR inside the JuliaContext that owns it.
    • malloc and @strptr convert pointers with pointercast!.
    • Compat: LLVM = "10" for CUDACore, CUDATools and cuBLAS, and GPUCompiler = "1.23.1" for CUDACore and CUDATools.
  • Behavior otherwise stays as in 6.2.2.
    • Atomics keep their default (system) sync scope and their signatures, without main's scope argument.
    • The ldg helper keeps the caller's index type.
    • I left out main's other changes: the scoped enums instead of LLVM.API constants (those still work), the IR string templates converted to @llvmgenerated, and the device-IR intrinsic rewrites.
  • Version bump. All packages go to 6.2.3.

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):

  • Julia 1.12.7, full default suite (test/runtests.jl): 18848 pass, 14 broken, and 20 failures in gpuarrays/broadcasting "mismatched sizes" (+/- through geam with 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/execution crashed its worker once during the parallel run. It passes on a rerun on its own (105/105).
  • libraries/cublas: 4378/4378 pass.
  • Julia 1.10.12, core tests: 7740 pass, 14 broken, no failures.
  • The Enzyme extension tests weren't run, because no Enzyme release supports LLVM.jl 10 yet.

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

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)
@maleadt

maleadt commented Oct 11, 2026

Copy link
Copy Markdown
Member

Lots of CI failures?

@maleadt maleadt added kernels Writing and compiling kernels: @cuda, device intrinsics, codegen, KernelAbstractions back-end. installation Toolkit and driver discovery, artifacts, platform support. labels Oct 19, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

installation Toolkit and driver discovery, artifacts, platform support. kernels Writing and compiling kernels: @cuda, device intrinsics, codegen, KernelAbstractions back-end.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants