Adapt to the library-based AMDGPU_LLVM_Backend_jll 23 and LLVMDowngrader_jll 0.10 - #1071
Conversation
…der_jll 0.10 The JLLs now ship `libamdgpu` and `libllvm_downgrade` instead of the `lld` and `llvm-downgrade` executables (JuliaPackaging/Yggdrasil#14727), and GPUCompiler 2.7 compiles through them in-process (JuliaGPU/GPUCompiler.jl#930). Follow suit for the two things AMDGPU.jl did with the tools itself: - Linking the kernel object into an HSA code object now goes through `AMDGPULink` (`ld.lld -flavor gnu -shared` in-process) whenever the artifact is used, without temporary files. A system `ld.lld` from ROCm is still preferred when found, and still spawned. `lld_artifact` now means "link through the library" and no longer comes with a path. - Downgrading the device libraries for the in-process LLVM goes through `LLVMDGDowngrade`, one buffer at a time.
3378a9b to
949199a
Compare
|
What's the reason we need to use |
Ah, yes. This was modeled after how we did things in JuliaGPU/GPUCompiler.jl#930, where the names are constructed more dynamically. I'll make it a plain |
9212c16 to
91edd35
Compare
|
Previous CI run was all green, an latest change was NFC, so merging this a little more quickly such that we get GPUCompiler reverse CI back. |
There was a problem hiding this comment.
AMDGPU.jl Benchmarks
Details
| Benchmark suite | Current: 91edd35 | Previous: b3e831e | Ratio |
|---|---|---|---|
amdgpu/synchronization/context/device |
557.5 ns |
575 ns |
0.97 |
amdgpu/synchronization/stream/blocking |
235 ns |
235 ns |
1 |
amdgpu/synchronization/stream/nonblocking |
320 ns |
317.5 ns |
1.01 |
applications/bitonic_sort |
1143756.25 ns |
1135751.5 ns |
1.01 |
applications/convolution |
113714 ns |
104889 ns |
1.08 |
applications/floyd_warshall |
8947917.5 ns |
8875884.5 ns |
1.01 |
applications/histogram |
817656.5 ns |
802806.75 ns |
1.02 |
applications/prefix_sum |
232690.75 ns |
230405.75 ns |
1.01 |
array/accumulate/Float32/1d |
80258.5 ns |
79131.25 ns |
1.01 |
array/accumulate/Float32/dims=1 |
272946.5 ns |
265801.5 ns |
1.03 |
array/accumulate/Float32/dims=1L |
69086 ns |
81151 ns |
0.85 |
array/accumulate/Float32/dims=2 |
87616.25 ns |
81428.75 ns |
1.08 |
array/accumulate/Float32/dims=2L |
2623047.75 ns |
2753025.75 ns |
0.95 |
array/accumulate/Int64/1d |
83183.75 ns |
77788.75 ns |
1.07 |
array/accumulate/Int64/dims=1 |
243648.5 ns |
245128.75 ns |
0.99 |
array/accumulate/Int64/dims=1L |
98031.25 ns |
83273.75 ns |
1.18 |
array/accumulate/Int64/dims=2 |
91528.75 ns |
86051.25 ns |
1.06 |
array/accumulate/Int64/dims=2L |
2900544.25 ns |
3132783.75 ns |
0.93 |
array/broadcast |
72818.5 ns |
72161 ns |
1.01 |
array/construct |
2327.5 ns |
2235 ns |
1.04 |
array/copy |
37090.75 ns |
37170.5 ns |
1.00 |
array/copyto!/cpu_to_gpu |
90263.75 ns |
111469 ns |
0.81 |
array/copyto!/gpu_to_cpu |
111844 ns |
111984 ns |
1.00 |
array/copyto!/gpu_to_gpu |
58743.25 ns |
58868.25 ns |
1.00 |
array/iteration/findall/bool |
142189.5 ns |
133412 ns |
1.07 |
array/iteration/findall/int |
149474.75 ns |
147627.25 ns |
1.01 |
array/iteration/findfirst/bool |
181745 ns |
182052.75 ns |
1.00 |
array/iteration/findfirst/int |
161587.25 ns |
142917.25 ns |
1.13 |
array/iteration/findmin/1d |
123824.5 ns |
119061.75 ns |
1.04 |
array/iteration/findmin/2d |
112974.25 ns |
108601.5 ns |
1.04 |
array/iteration/logical |
240981 ns |
238773.75 ns |
1.01 |
array/iteration/scalar |
290179.25 ns |
292314.5 ns |
0.99 |
array/permutedims/2d |
59383.5 ns |
70388.5 ns |
0.84 |
array/permutedims/3d |
71118.5 ns |
69858.5 ns |
1.02 |
array/permutedims/4d |
73231 ns |
72816 ns |
1.01 |
array/random/rand/Float32 |
44868 ns |
45410.75 ns |
0.99 |
array/random/rand/Int64 |
53795.75 ns |
53175.75 ns |
1.01 |
array/random/rand!/Float32 |
64888.5 ns |
64423.5 ns |
1.01 |
array/random/rand!/Int64 |
72663.75 ns |
66538.5 ns |
1.09 |
array/random/randn/Float32 |
80501 ns |
76001 ns |
1.06 |
array/random/randn!/Float32 |
80818.5 ns |
80356.25 ns |
1.01 |
array/reductions/mapreduce/Float32/1d |
101614 ns |
94806.5 ns |
1.07 |
array/reductions/mapreduce/Float32/dims=1 |
89986.5 ns |
86078.75 ns |
1.05 |
array/reductions/mapreduce/Float32/dims=1L |
844724.75 ns |
802139.5 ns |
1.05 |
array/reductions/mapreduce/Float32/dims=2 |
94139 ns |
75523.75 ns |
1.25 |
array/reductions/mapreduce/Float32/dims=2L |
139169.5 ns |
136907 ns |
1.02 |
array/reductions/mapreduce/Int64/1d |
101571.5 ns |
93919 ns |
1.08 |
array/reductions/mapreduce/Int64/dims=1 |
90671.25 ns |
89003.75 ns |
1.02 |
array/reductions/mapreduce/Int64/dims=1L |
858675 ns |
806172 ns |
1.07 |
array/reductions/mapreduce/Int64/dims=2 |
74703.5 ns |
83146.25 ns |
0.90 |
array/reductions/mapreduce/Int64/dims=2L |
140309.5 ns |
138227 ns |
1.02 |
array/reductions/reduce/Float32/1d |
101721.5 ns |
94399 ns |
1.08 |
array/reductions/reduce/Float32/dims=1 |
90168.75 ns |
84823.75 ns |
1.06 |
array/reductions/reduce/Float32/dims=1L |
843050 ns |
800964.5 ns |
1.05 |
array/reductions/reduce/Float32/dims=2 |
95879 ns |
75003.75 ns |
1.28 |
array/reductions/reduce/Float32/dims=2L |
138504.5 ns |
137049.75 ns |
1.01 |
array/reductions/reduce/Int64/1d |
101284 ns |
94093.75 ns |
1.08 |
array/reductions/reduce/Int64/dims=1 |
90696.5 ns |
88986.25 ns |
1.02 |
array/reductions/reduce/Int64/dims=1L |
848904.75 ns |
808594.5 ns |
1.05 |
array/reductions/reduce/Int64/dims=2 |
74486 ns |
83041.25 ns |
0.90 |
array/reductions/reduce/Int64/dims=2L |
140372 ns |
139134.75 ns |
1.01 |
array/reverse/1d |
44203.25 ns |
43285.5 ns |
1.02 |
array/reverse/1dL |
74316 ns |
70681 ns |
1.05 |
array/reverse/1dL_inplace |
78261.25 ns |
77993.75 ns |
1.00 |
array/reverse/1d_inplace |
59681 ns |
37600.5 ns |
1.59 |
array/reverse/2d |
49600.75 ns |
48985.75 ns |
1.01 |
array/reverse/2dL |
87661.25 ns |
82579 ns |
1.06 |
array/reverse/2dL_inplace |
89984 ns |
89033.75 ns |
1.01 |
array/reverse/2d_inplace |
61613.5 ns |
61158.25 ns |
1.01 |
array/sorting/1d |
332814.75 ns |
331257.25 ns |
1.00 |
gemm/tiled |
1886369.5 ns |
1907183 ns |
0.99 |
gemm/tiled_unbounded |
1919549.75 ns |
1909665.5 ns |
1.01 |
integration/byval/reference |
39571 ns |
39340 ns |
1.01 |
integration/byval/slices=1 |
41641 ns |
41231 ns |
1.01 |
integration/byval/slices=2 |
158833 ns |
123942 ns |
1.28 |
integration/byval/slices=3 |
238033 ns |
229293 ns |
1.04 |
integration/volumerhs |
5006621 ns |
4913802 ns |
1.02 |
kernel/indexing |
56016 ns |
47750.75 ns |
1.17 |
kernel/indexing_checked |
57395.75 ns |
57591 ns |
1.00 |
kernel/launch |
1377.5 ns |
1260 ns |
1.09 |
kernel/rand |
83368.75 ns |
97451.5 ns |
0.86 |
latency/import |
1748778764 ns |
1755925272 ns |
1.00 |
latency/precompile |
39786339983 ns |
39950566320 ns |
1.00 |
latency/ttfp |
2320769848 ns |
2345510054 ns |
0.99 |
stencil/diffusion3d |
1621991.75 ns |
1629262.5 ns |
1.00 |
stencil/diffusion3d_checked |
1665800 ns |
1657793 ns |
1.00 |
This comment was automatically generated by workflow using github-action-benchmark.
JuliaPackaging/Yggdrasil#14727 replaced the
llc,lldandllvm-downgradeexecutables 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.AMDGPU.jl used two of the removed tools itself, so besides the compat bumps (
AMDGPU_LLVM_Backend_jll→ 23,LLVMDowngrader_jll→ 0.10,GPUCompiler→ 2.7):AMDGPULinkfromlibamdgpu(ld.lld -flavor gnu -sharedin-process, no temporary files) whenever the artifact is used. A systemld.lldfrom ROCm is still preferred when found, and still spawned as before.lld_artifactnow means "link through the library" and no longer comes with a tool path;versioninfoshows the library instead.LLVMDGDowngrade, one buffer at a time, with the downgrader's error message in the warning when a library is skipped.