Skip to content

Switch to CompilerCaching.jl.#961

Open
maleadt wants to merge 2 commits into
mainfrom
tb/compilercaching
Open

Switch to CompilerCaching.jl.#961
maleadt wants to merge 2 commits into
mainfrom
tb/compilercaching

Conversation

@maleadt

@maleadt maleadt commented Jul 6, 2026

Copy link
Copy Markdown
Member

No description provided.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AMDGPU.jl Benchmarks

Details
Benchmark suite Current: 825b4f4 Previous: e73cebd Ratio
amdgpu/synchronization/context/device 600 ns 600 ns 1
amdgpu/synchronization/stream/blocking 250 ns 250 ns 1
amdgpu/synchronization/stream/nonblocking 340 ns 340 ns 1
array/accumulate/Float32/1d 84321 ns 86591 ns 0.97
array/accumulate/Float32/dims=1 263584 ns 344845 ns 0.76
array/accumulate/Float32/dims=1L 135992 ns 136302 ns 1.00
array/accumulate/Float32/dims=2 134562 ns 138422 ns 0.97
array/accumulate/Float32/dims=2L 2808191 ns 2811150 ns 1.00
array/accumulate/Int64/1d 100322 ns 97821 ns 1.03
array/accumulate/Int64/dims=1 251214 ns 255884 ns 0.98
array/accumulate/Int64/dims=1L 167193 ns 163062 ns 1.03
array/accumulate/Int64/dims=2 127522 ns 126152 ns 1.01
array/accumulate/Int64/dims=2L 2990593 ns 2988132 ns 1.00
array/broadcast 147542 ns 91501 ns 1.61
array/construct 1720 ns 1740 ns 0.99
array/copy 37080 ns 39290 ns 0.94
array/copyto!/cpu_to_gpu 183423 ns 183122 ns 1.00
array/copyto!/gpu_to_cpu 183593 ns 115292 ns 1.59
array/copyto!/gpu_to_gpu 130912 ns 130942 ns 1.00
array/iteration/findall/bool 179423 ns 181202 ns 0.99
array/iteration/findall/int 201183 ns 199323 ns 1.01
array/iteration/findfirst/bool 118762 ns 125122 ns 0.95
array/iteration/findfirst/int 115992 ns 118152 ns 0.98
array/iteration/findmin/1d 171413 ns 170723 ns 1.00
array/iteration/findmin/2d 156852 ns 156842 ns 1.00
array/iteration/logical 353785 ns 348555 ns 1.02
array/iteration/scalar 290154 ns 289374 ns 1.00
array/permutedims/2d 75681 ns 74621 ns 1.01
array/permutedims/3d 75781 ns 74771 ns 1.01
array/permutedims/4d 77541 ns 77081 ns 1.01
array/random/rand/Float32 52271 ns 52431 ns 1.00
array/random/rand/Int64 59721 ns 58791 ns 1.02
array/random/rand!/Float32 91072 ns 126382 ns 0.72
array/random/rand!/Int64 144952 ns 90851 ns 1.60
array/random/randn/Float32 89341 ns 88321 ns 1.01
array/random/randn!/Float32 145872 ns 114642 ns 1.27
array/reductions/mapreduce/Float32/1d 134652 ns 133232 ns 1.01
array/reductions/mapreduce/Float32/dims=1 97062 ns 95322 ns 1.02
array/reductions/mapreduce/Float32/dims=1L 777951 ns 778031 ns 1.00
array/reductions/mapreduce/Float32/dims=2 99652 ns 97481 ns 1.02
array/reductions/mapreduce/Float32/dims=2L 298954 ns 303054 ns 0.99
array/reductions/mapreduce/Int64/1d 138872 ns 133642 ns 1.04
array/reductions/mapreduce/Int64/dims=1 97092 ns 96002 ns 1.01
array/reductions/mapreduce/Int64/dims=1L 783081 ns 783691 ns 1.00
array/reductions/mapreduce/Int64/dims=2 98412 ns 94871 ns 1.04
array/reductions/mapreduce/Int64/dims=2L 303295 ns 295344 ns 1.03
array/reductions/reduce/Float32/1d 136602 ns 133712 ns 1.02
array/reductions/reduce/Float32/dims=1 97391 ns 94911 ns 1.03
array/reductions/reduce/Float32/dims=1L 776961 ns 775850 ns 1.00
array/reductions/reduce/Float32/dims=2 99412 ns 96732 ns 1.03
array/reductions/reduce/Float32/dims=2L 301274 ns 296144 ns 1.02
array/reductions/reduce/Int64/1d 134532 ns 133632 ns 1.01
array/reductions/reduce/Int64/dims=1 96821 ns 95521 ns 1.01
array/reductions/reduce/Int64/dims=1L 784081 ns 785631 ns 1.00
array/reductions/reduce/Int64/dims=2 97931 ns 96781 ns 1.01
array/reductions/reduce/Int64/dims=2L 297474 ns 300024 ns 0.99
array/reverse/1d 44471 ns 43090 ns 1.03
array/reverse/1dL 76841 ns 74821 ns 1.03
array/reverse/1dL_inplace 134241 ns 118171 ns 1.14
array/reverse/1d_inplace 140762 ns 73531 ns 1.91
array/reverse/2d 53031 ns 51091 ns 1.04
array/reverse/2dL 102711 ns 101392 ns 1.01
array/reverse/2dL_inplace 118582 ns 178633 ns 0.66
array/reverse/2d_inplace 60341 ns 143843 ns 0.42
array/sorting/1d 345845 ns 341594 ns 1.01
integration/byval/reference 39590 ns 39160 ns 1.01
integration/byval/slices=1 40321 ns 41701 ns 0.97
integration/byval/slices=2 160092 ns 157872 ns 1.01
integration/byval/slices=3 239264 ns 240533 ns 0.99
integration/volumerhs 5043483 ns 4941880 ns 1.02
kernel/indexing 65581 ns 121521 ns 0.54
kernel/indexing_checked 132762 ns 63651 ns 2.09
kernel/launch 1570 ns 1340 ns 1.17
kernel/rand 197312 ns 195973 ns 1.01
latency/import 1740434752 ns 1591443328 ns 1.09
latency/precompile 37300401844 ns 36454927171 ns 1.02
latency/ttfp 5733290610 ns 2161911248 ns 2.65

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

@maleadt maleadt force-pushed the tb/compilercaching branch 2 times, most recently from 57f2026 to 0f18147 Compare July 10, 2026 14:28
@maleadt maleadt force-pushed the tb/compilercaching branch from 0f18147 to bdb2ee9 Compare July 13, 2026 09:09
@maleadt maleadt marked this pull request as ready for review July 13, 2026 10:04
@maleadt

maleadt commented Jul 13, 2026

Copy link
Copy Markdown
Member Author

Done on my end. I'll leave it to AMDGPU.jl maintainers to merge this.

@luraess

luraess commented Jul 13, 2026

Copy link
Copy Markdown
Member

@wsmoses we have this now failing for Enzyme tests as this PR requires now GPUCompiler v2 and Enzyme is still at 1.6.2 (see https://buildkite.com/julialang/amdgpu-dot-jl/builds/3886#019f5b1f-0fd3-4bc7-8c10-878504fd0dc9/L669). Could we bump compat and patch Enzyme?

@wsmoses

wsmoses commented Jul 13, 2026

Copy link
Copy Markdown
Member

@vchuravy has a pr starting to look into it.

That said, @maleadt as the changes here don't look huge, is it possible to conditionally gate this with something like

if gpucompilerver >= 2
a()
else
b()
end

that way downstream packages that haven't adapted yet [like enzyme/reactant] can still run ci with?

And the same for cuda/metal?

@maleadt

maleadt commented Jul 13, 2026

Copy link
Copy Markdown
Member Author

I'd rather not. I've added enough cruft already in GPUCompiler just to keep supporting 1.10 for Enzyme, and I don't want that leak into the back-ends too.

@wsmoses

wsmoses commented Jul 13, 2026

Copy link
Copy Markdown
Member

Fair enough, in which case would you be able to help us adapt enzyme/reactant to gpucompiler 2?

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.

4 participants