Skip to content

Adapt to the library-based NVPTX_LLVM_Backend_jll 23 - #3267

Merged
maleadt merged 2 commits into
mainfrom
tb/jll-libraries
Sep 11, 2026
Merged

maleadt merged 2 commits into
mainfrom
tb/jll-libraries

Conversation

@maleadt

@maleadt maleadt commented Sep 9, 2026 •

Copy link
Copy Markdown
Member

JuliaPackaging/Yggdrasil#14727 replaced the llc, lld and llvm-downgrade executables in the GPU LLVM JLLs with shared libraries exposing a small C API, moving the back-ends to LLVM 23 at the same time. JuliaGPU/GPUCompiler.jl#930 makes GPUCompiler call those libraries in-process, and bumps its compat to the new JLL majors. Since this package pins the same JLL, it needs its compat bumped in lockstep, which is what this PR does.

Changes:

  • CUDACore: NVPTX_LLVM_Backend_jll compat 22 → 23, GPUCompiler compat → 2.7 (the library API needs the new GPUCompiler). No code references the JLL's products; the compatibility tables already know LLVM 23.
  • The integer abs PTX test now accepts max.s32/max.s64: since LLVM 23 ([SelectionDAG] Add ISD::ABS_MIN_POISON to preserve poision semantics of llvm.abs llvm/llvm-project#183851) only llvm.abs with the poison flag lowers to PTX abs.s, which is undefined for INT_MIN, and Julia's abs must map INT_MIN to itself, so it becomes neg + max.

Note that NVPTX_LLVM_Backend_jll 23.1.1+0 had a bug in its FMA contraction option (fused in LLVM instead of leaving pairs contractible for ptxas); 23.1.1+1 fixes it, and compat cannot exclude the +0 build.

NVPTX_LLVM_Backend_jll 23 ships `libnvptx` instead of `llc`; GPUCompiler 2.7
calls it in-process (JuliaGPU/GPUCompiler.jl#930). CUDA.jl only needs the
compat bump; its compatibility tables already know LLVM 23.

Since LLVM 23 (llvm/llvm-project#183851) only `llvm.abs` with the poison
flag lowers to PTX `abs.s`, which is undefined for INT_MIN. Julia's `abs`
maps INT_MIN to itself, so it now becomes `neg` + `max`; accept that in
the integer abs test.
@github-actions

github-actions Bot commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

CUDA.jl Benchmarks

Details
Benchmark suite Current: 304a683 Previous: e94446c Ratio
array/accumulate/Float32/1d 98840 ns 98260 ns 1.01
array/accumulate/Float32/dims=1 72953 ns 71580 ns 1.02
array/accumulate/Float32/dims=1L 1590723 ns 1599406 ns 0.99
array/accumulate/Float32/dims=2 138427 ns 136501 ns 1.01
array/accumulate/Float32/dims=2L 663008 ns 660905 ns 1.00
array/accumulate/Int64/1d 118638 ns 118400 ns 1.00
array/accumulate/Int64/dims=1 76388 ns 75812 ns 1.01
array/accumulate/Int64/dims=1L 1702219 ns 1714599 ns 0.99
array/accumulate/Int64/dims=2 151533 ns 148622 ns 1.02
array/accumulate/Int64/dims=2L 987966 ns 987047 ns 1.00
array/broadcast 18485 ns 18404 ns 1.00
array/broadcast launch 9967 ns 9654 ns 1.03
array/construct 922.8064516129032 ns 939.0967741935484 ns 0.98
array/copy 16679 ns 16406 ns 1.02
array/copyto!/cpu_to_gpu 209469 ns 206627 ns 1.01
array/copyto!/gpu_to_cpu 242644 ns 240222 ns 1.01
array/copyto!/gpu_to_gpu 8865.333333333334 ns 8693 ns 1.02
array/iteration/findall/bool 133860 ns 133493 ns 1.00
array/iteration/findall/int 148475 ns 147703 ns 1.01
array/iteration/findfirst/bool 70987 ns 69631 ns 1.02
array/iteration/findfirst/int 72642 ns 70675 ns 1.03
array/iteration/findmin/1d 68410 ns 65468 ns 1.04
array/iteration/findmin/2d 101412 ns 99926 ns 1.01
array/iteration/logical 195567 ns 191094 ns 1.02
array/iteration/scalar 63263 ns 62400 ns 1.01
array/permutedims/2d 49582 ns 48890 ns 1.01
array/permutedims/3d 51034 ns 50580 ns 1.01
array/permutedims/4d 51461 ns 50191 ns 1.03
array/random/rand/Float32 11222 ns 10859 ns 1.03
array/random/rand/Int64 21496 ns 21058 ns 1.02
array/random/rand!/Float32 7965 ns 7807.5 ns 1.02
array/random/rand!/Int64 19481 ns 20484 ns 0.95
array/random/randn/Float32 34202 ns 33556 ns 1.02
array/random/randn!/Float32 23320 ns 23685 ns 0.98
array/reductions/mapreduce/Float32/1d 34093 ns 33179 ns 1.03
array/reductions/mapreduce/Float32/dims=1 38831 ns 37934 ns 1.02
array/reductions/mapreduce/Float32/dims=1L 51336 ns 50708 ns 1.01
array/reductions/mapreduce/Float32/dims=2 56634 ns 55105 ns 1.03
array/reductions/mapreduce/Float32/dims=2L 68176 ns 67222 ns 1.01
array/reductions/mapreduce/Int64/1d 41849 ns 41213 ns 1.02
array/reductions/mapreduce/Int64/dims=1 41219 ns 41011 ns 1.01
array/reductions/mapreduce/Int64/dims=1L 88977 ns 88752 ns 1.00
array/reductions/mapreduce/Int64/dims=2 58409 ns 57557 ns 1.01
array/reductions/mapreduce/Int64/dims=2L 84458 ns 83504 ns 1.01
array/reductions/reduce/Float32/1d 33730 ns 33340 ns 1.01
array/reductions/reduce/Float32/dims=1 38026 ns 37782 ns 1.01
array/reductions/reduce/Float32/dims=1L 50997 ns 50647 ns 1.01
array/reductions/reduce/Float32/dims=2 55660 ns 55026 ns 1.01
array/reductions/reduce/Float32/dims=2L 68535 ns 68497 ns 1.00
array/reductions/reduce/Int64/1d 42221 ns 41017 ns 1.03
array/reductions/reduce/Int64/dims=1 41328 ns 40606 ns 1.02
array/reductions/reduce/Int64/dims=1L 89036 ns 88762 ns 1.00
array/reductions/reduce/Int64/dims=2 58770 ns 57379 ns 1.02
array/reductions/reduce/Int64/dims=2L 84561 ns 83389 ns 1.01
array/reverse/1d 16159 ns 17082 ns 0.95
array/reverse/1dL 69941 ns 69888 ns 1.00
array/reverse/1dL_inplace 67777 ns 67721 ns 1.00
array/reverse/1d_inplace 9004 ns 8855.666666666666 ns 1.02
array/reverse/2d 20499 ns 20119 ns 1.02
array/reverse/2dL 73804 ns 73467 ns 1.00
array/reverse/2dL_inplace 67684 ns 67398 ns 1.00
array/reverse/2d_inplace 10323 ns 10085 ns 1.02
array/sorting/1d 2639306 ns 2640661 ns 1.00
array/sorting/2d 1019230 ns 1029199 ns 0.99
array/sorting/by 3175659 ns 3155779 ns 1.01
cuda/synchronization/context/auto 1035.1 ns 1033.7 ns 1.00
cuda/synchronization/context/blocking 801.86 ns 799.7415730337078 ns 1.00
cuda/synchronization/context/nonblocking 5827.666666666667 ns 5869.833333333333 ns 0.99
cuda/synchronization/stream/auto 878.8260869565217 ns 869.0980392156863 ns 1.01
cuda/synchronization/stream/blocking 669.421052631579 ns 672.4144736842105 ns 1.00
cuda/synchronization/stream/nonblocking 5724.166666666667 ns 5623.714285714285 ns 1.02
integration/byval/reference 148212 ns 148331 ns 1.00
integration/byval/slices=1 149413 ns 149217 ns 1.00
integration/byval/slices=2 292362 ns 291903 ns 1.00
integration/byval/slices=3 435554 ns 435113 ns 1.00
integration/cudadevrt 105483 ns 105462 ns 1.00
integration/volumerhs 9145621 ns 9138309 ns 1.00
kernel/indexing 13316 ns 13181 ns 1.01
kernel/indexing_checked 14058 ns 13900 ns 1.01
kernel/launch 2349.5555555555557 ns 2293.1111111111113 ns 1.02
kernel/occupancy 880.9137931034483 ns 841.4430379746835 ns 1.05
kernel/rand 14308 ns 16464 ns 0.87
latency/import 4201203057 ns 4216998657 ns 1.00
latency/precompile 4955314654 ns 4950855891 ns 1.00
latency/ttfp 4654533020 ns 4698355034 ns 0.99

This comment was automatically generated by workflow using github-action-benchmark.

@maleadt
maleadt merged commit fdd4f70 into main Sep 11, 2026
1 check passed
@maleadt
maleadt deleted the tb/jll-libraries branch September 11, 2026 10:16
@codecov

codecov Bot commented Sep 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.56%. Comparing base (c34b904) to head (304a683).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3267      +/-   ##
==========================================
- Coverage   92.58%   92.56%   -0.02%     
==========================================
  Files         188      188              
  Lines       16471    16471              
==========================================
- Hits        15249    15246       -3     
- Misses       1222     1225       +3     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant