Skip to content

Stop using GPUCompiler's internal type_tag in the relocation test - #3500

Merged
maleadt merged 1 commit into
mainfrom
tb/reloc-cglobal-test
Oct 28, 2026
Merged

maleadt merged 1 commit into
mainfrom
tb/reloc-cglobal-test

Conversation

@maleadt

@maleadt maleadt commented Oct 28, 2026

Copy link
Copy Markdown
Member

The relocation patching test read a libjulia global through GPUCompiler.Runtime.type_tag(Val(:float32)). JuliaGPU/GPUCompiler.jl#1067 removes that method, since the runtime no longer loads type tags from data symbols. Emit the load from jl_float32_type with llvmcall instead, which exercises the same relocation without depending on GPUCompiler internals.

The relocation patching test read a libjulia global through
`GPUCompiler.Runtime.type_tag(Val(:float32))`. JuliaGPU/GPUCompiler.jl#1067
removes that method, since the runtime no longer loads type tags from data
symbols. Emit the load from `jl_float32_type` with `llvmcall` instead, which
exercises the same relocation without depending on GPUCompiler internals.
@maleadt
maleadt merged commit adb58a9 into main Oct 28, 2026
14 of 15 checks passed
@maleadt
maleadt deleted the tb/reloc-cglobal-test branch October 28, 2026 20:12
@github-actions

Copy link
Copy Markdown
Contributor

Benchmark results

Compared with d32eb2641, the merge base.
The environment differs from the baseline's: GPUArrays 12.1.1 → 12.2.0, GPUArraysCore 0.2.1 → 0.2.2, SPIRVIntrinsics 1.5.1 → 1.6.0.

Times are the minimum time of every benchmark. A change is unusual when it exceeds both three times the benchmark's typical change between consecutive runs on the default branch and a minimum per category (performance 3%, latency 5%, applications 3%, other 3%). A benchmark that starts or stops allocating is listed however few the allocations. A single run can still be a fluke, so rerun before drawing conclusions.

Geometric mean Unusual: slower Unusual: faster Compared
Performance +0.1% 0 0 79
Latency +0.2% 0 0 3
Applications −0.1% 0 0 6

No unusual changes.

All benchmarks
Benchmark Baseline This PR Change
Performance
array/accumulate/Float32/1d 39.5 µs 40.0 µs +1.4%
array/accumulate/Float32/dims=1 29.1 µs 29.7 µs +1.9%
array/accumulate/Float32/dims=1L 83.6 µs 83.8 µs +0.3%
array/accumulate/Float32/dims=2 48.1 µs 48.6 µs +0.9%
array/accumulate/Float32/dims=2L 372 µs 372 µs −0.0%
array/accumulate/Int64/1d 70.8 µs 71.4 µs +0.9%
array/accumulate/Int64/dims=1 46.6 µs 46.3 µs −0.6%
array/accumulate/Int64/dims=1L 142 µs 142 µs +0.0%
array/accumulate/Int64/dims=2 68.0 µs 68.3 µs +0.4%
array/accumulate/Int64/dims=2L 765 µs 768 µs +0.4%
array/broadcast 9.50 µs 9.42 µs −0.9%
array/broadcast launch 5.89 µs 5.78 µs −1.7%
array/construct 950 ns 917 ns −3.4%
array/copy 17.2 µs 17.4 µs +1.1%
array/copyto!/cpu_to_gpu 208 µs 210 µs +1.2%
array/copyto!/gpu_to_cpu 241 µs 242 µs +0.7%
array/copyto!/gpu_to_gpu 8.82 µs 8.95 µs +1.5%
array/iteration/findall/bool 46.0 µs 46.5 µs +1.0%
array/iteration/findall/int 59.3 µs 60.8 µs +2.6%
array/iteration/findfirst/bool 33.6 µs 33.8 µs +0.6%
array/iteration/findfirst/int 33.6 µs 33.7 µs +0.2%
array/iteration/findmin/1d 51.2 µs 52.0 µs +1.6%
array/iteration/findmin/2d 47.1 µs 48.1 µs +2.0%
array/iteration/logical 45.9 µs 46.8 µs +2.1%
array/iteration/scalar 60.1 µs 60.0 µs −0.2%
array/permutedims/2d 46.1 µs 46.0 µs −0.2%
array/permutedims/3d 43.5 µs 43.1 µs −1.0%
array/permutedims/4d 36.9 µs 36.0 µs −2.2%
array/random/rand!/Float32 8.36 µs 8.48 µs +1.4%
array/random/rand!/Int64 14.7 µs 14.6 µs −0.6%
array/random/rand/Float32 11.4 µs 11.3 µs −1.6%
array/random/rand/Int64 16.8 µs 16.7 µs −0.9%
array/random/randn!/Float32 25.1 µs 25.2 µs +0.7%
array/random/randn/Float32 33.8 µs 33.6 µs −0.6%
array/reductions/mapreduce/Float32/1d 31.6 µs 32.0 µs +1.4%
array/reductions/mapreduce/Float32/dims=1 17.2 µs 17.0 µs −1.2%
array/reductions/mapreduce/Float32/dims=1L 54.5 µs 54.5 µs −0.0%
array/reductions/mapreduce/Float32/dims=2 24.0 µs 24.2 µs +0.9%
array/reductions/mapreduce/Float32/dims=2L 55.1 µs 54.6 µs −0.8%
array/reductions/mapreduce/Int64/1d 31.5 µs 31.8 µs +0.9%
array/reductions/mapreduce/Int64/dims=1 18.9 µs 19.0 µs +0.7%
array/reductions/mapreduce/Int64/dims=1L 93.4 µs 93.5 µs +0.1%
array/reductions/mapreduce/Int64/dims=2 25.4 µs 25.4 µs −0.3%
array/reductions/mapreduce/Int64/dims=2L 79.8 µs 80.6 µs +0.9%
array/reductions/reduce/Float32/1d 31.3 µs 32.0 µs +2.1%
array/reductions/reduce/Float32/dims=1 17.0 µs 16.9 µs −0.6%
array/reductions/reduce/Float32/dims=1L 54.6 µs 54.7 µs +0.3%
array/reductions/reduce/Float32/dims=2 24.0 µs 23.7 µs −1.5%
array/reductions/reduce/Float32/dims=2L 55.0 µs 54.7 µs −0.6%
array/reductions/reduce/Int64/1d 31.6 µs 31.6 µs −0.0%
array/reductions/reduce/Int64/dims=1 18.9 µs 18.9 µs −0.3%
array/reductions/reduce/Int64/dims=1L 93.6 µs 93.8 µs +0.1%
array/reductions/reduce/Int64/dims=2 25.3 µs 25.5 µs +0.8%
array/reductions/reduce/Int64/dims=2L 80.4 µs 80.9 µs +0.7%
array/reverse/1d 18.6 µs 18.9 µs +1.5%
array/reverse/1d_inplace 11.5 µs 11.3 µs −1.7%
array/reverse/1dL 72.7 µs 72.6 µs −0.1%
array/reverse/1dL_inplace 69.8 µs 69.4 µs −0.5%
array/reverse/2d 21.4 µs 21.3 µs −0.2%
array/reverse/2d_inplace 13.9 µs 13.9 µs −0.2%
array/reverse/2dL 79.8 µs 79.9 µs +0.1%
array/reverse/2dL_inplace 70.1 µs 69.9 µs −0.3%
array/sorting/1d 651 µs 651 µs −0.1%
array/sorting/2d 177 µs 177 µs −0.2%
array/sorting/by 851 µs 853 µs +0.3%
cuda/graph/capture 27.7 µs 27.7 µs +0.0%
cuda/graph/eager 27.8 µs 25.3 µs −9.1%
cuda/graph/launch 14.0 µs 14.0 µs −0.1%
cuda/synchronization/context/auto 2.35 µs 2.38 µs +1.1%
cuda/synchronization/context/blocking 933 ns 913 ns −2.1%
cuda/synchronization/context/nonblocking 10.7 µs 11.1 µs +3.7%
cuda/synchronization/stream/auto 886 ns 875 ns −1.2%
cuda/synchronization/stream/blocking 776 ns 780 ns +0.6%
cuda/synchronization/stream/nonblocking 8.34 µs 8.67 µs +3.9%
kernel/indexing 10.5 µs 10.5 µs +0.4%
kernel/indexing_checked 11.2 µs 11.2 µs +0.1%
kernel/launch 1.38 µs 1.39 µs +1.4%
kernel/occupancy 34.2 ns 34.2 ns −0.0%
kernel/rand 14.0 µs 14.0 µs −0.3%
Latency
import 3.95 s 3.95 s +0.1%
precompile 4.91 s 4.92 s +0.2%
ttfp 4.46 s 4.49 s +0.5%
Applications
byval/reference 147 µs 147 µs −0.2%
byval/slices=1 148 µs 147 µs −0.2%
byval/slices=2 289 µs 289 µs −0.0%
byval/slices=3 431 µs 431 µs −0.1%
cudadevrt 104 µs 104 µs −0.1%
volumerhs 9.61 ms 9.61 ms −0.0%

History: https://juliagpu.org/perf/?pkg=cuda

@codecov

codecov Bot commented Oct 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.20%. Comparing base (d32eb26) to head (a98f7fe).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #3500       +/-   ##
===========================================
+ Coverage   43.88%   86.20%   +42.32%     
===========================================
  Files         196      196               
  Lines       21356    21247      -109     
===========================================
+ Hits         9372    18317     +8945     
+ Misses      11984     2930     -9054     

☔ 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