Skip to content

Test KernelAbstractions launches by their behavior, not the launch kind - #3458

Merged
maleadt merged 1 commit into
mainfrom
tb/ka-fold-launch-tests
Oct 23, 2026
Merged

maleadt merged 1 commit into
mainfrom
tb/ka-fold-launch-tests

Conversation

@maleadt

@maleadt maleadt commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

The launch configuration tests asserted which kind of launch KernelAbstractions picks for a few shapes. That choice is KernelAbstractions' policy, not something the back end controls, and the assertions break whenever it changes: JuliaGPU/KernelAbstractions.jl#919 launches 4-d ranges on the N-d grid, which fails them on every back end.

This keeps the checks of what the back end does affect: that a dynamic 3-d range is indexed without divisions, and that iteration spaces too large for 32-bit indices are indexed correctly. The latter now covers a 4-d range that is launched on the N-d grid with JuliaGPU/KernelAbstractions.jl#919, and one that is only large along its last dimension.

The tests pass with KernelAbstractions main and with JuliaGPU/KernelAbstractions.jl#919, so this can be merged first.

The launch configuration tests asserted which kind of launch
KernelAbstractions picks for a few shapes. That is KernelAbstractions'
policy, not something the back end controls, and the assertions break
whenever it changes (JuliaGPU/KernelAbstractions.jl#912 launches 4-d
ranges on the N-d grid).

Keep the checks of what the back end does affect: that a dynamic 3-d
range is indexed without divisions, and that iteration spaces too large
for 32-bit indices are indexed correctly, now also one that is only
large along its last dimension.
@github-actions

Copy link
Copy Markdown
Contributor

CUDA.jl Benchmarks

Details
Benchmark suite Current: 12e67b0 Previous: 4c4b3e5 Ratio
array/accumulate/Float32/1d 53513 ns 55804 ns 0.96
array/accumulate/Float32/dims=1 39257 ns 40028 ns 0.98
array/accumulate/Float32/dims=1L 82385 ns 82750 ns 1.00
array/accumulate/Float32/dims=2 49192 ns 49956 ns 0.98
array/accumulate/Float32/dims=2L 399160 ns 398401 ns 1.00
array/accumulate/Int64/1d 87912 ns 88814 ns 0.99
array/accumulate/Int64/dims=1 59858 ns 60000 ns 1.00
array/accumulate/Int64/dims=1L 139986 ns 140124 ns 1.00
array/accumulate/Int64/dims=2 68283 ns 69307 ns 0.99
array/accumulate/Int64/dims=2L 795586 ns 796279 ns 1.00
array/broadcast 10489 ns 10347 ns 1.01
array/broadcast launch 6656.8 ns 6790.2 ns 0.98
array/construct 933.3684210526316 ns 920.25 ns 1.01
array/copy 16883 ns 16941 ns 1.00
array/copyto!/cpu_to_gpu 207710 ns 208550 ns 1.00
array/copyto!/gpu_to_cpu 238972 ns 241531 ns 0.99
array/copyto!/gpu_to_gpu 8816 ns 9009 ns 0.98
array/iteration/findall/bool 49438 ns 50331 ns 0.98
array/iteration/findall/int 64239 ns 65676 ns 0.98
array/iteration/findfirst/bool 34409 ns 35523 ns 0.97
array/iteration/findfirst/int 34838 ns 35669 ns 0.98
array/iteration/findmin/1d 50110 ns 51799 ns 0.97
array/iteration/findmin/2d 51255 ns 53096 ns 0.97
array/iteration/logical 49705 ns 49885 ns 1.00
array/iteration/scalar 60995 ns 62101 ns 0.98
array/permutedims/2d 47105 ns 47294 ns 1.00
array/permutedims/3d 45069 ns 44494 ns 1.01
array/permutedims/4d 47794 ns 47646 ns 1.00
array/random/rand/Float32 11126 ns 11219 ns 0.99
array/random/rand/Int64 17683 ns 17674 ns 1.00
array/random/rand!/Float32 8263 ns 8372.333333333334 ns 0.99
array/random/rand!/Int64 15576 ns 15576 ns 1
array/random/randn/Float32 34148 ns 34174 ns 1.00
array/random/randn!/Float32 25029 ns 25289 ns 0.99
array/reductions/mapreduce/Float32/1d 34229 ns 35857 ns 0.95
array/reductions/mapreduce/Float32/dims=1 19671 ns 20204 ns 0.97
array/reductions/mapreduce/Float32/dims=1L 57672 ns 57641 ns 1.00
array/reductions/mapreduce/Float32/dims=2 27309 ns 28520 ns 0.96
array/reductions/mapreduce/Float32/dims=2L 57948 ns 58314 ns 0.99
array/reductions/mapreduce/Int64/1d 35517 ns 36343 ns 0.98
array/reductions/mapreduce/Int64/dims=1 21975 ns 22390 ns 0.98
array/reductions/mapreduce/Int64/dims=1L 96909 ns 97258 ns 1.00
array/reductions/mapreduce/Int64/dims=2 29223 ns 29457 ns 0.99
array/reductions/mapreduce/Int64/dims=2L 82897 ns 84461 ns 0.98
array/reductions/reduce/Float32/1d 34796 ns 35872 ns 0.97
array/reductions/reduce/Float32/dims=1 20050 ns 20932 ns 0.96
array/reductions/reduce/Float32/dims=1L 57591 ns 58293 ns 0.99
array/reductions/reduce/Float32/dims=2 27764 ns 28664 ns 0.97
array/reductions/reduce/Float32/dims=2L 57756 ns 58605 ns 0.99
array/reductions/reduce/Int64/1d 35553 ns 37120 ns 0.96
array/reductions/reduce/Int64/dims=1 22307 ns 22603 ns 0.99
array/reductions/reduce/Int64/dims=1L 97197 ns 97266 ns 1.00
array/reductions/reduce/Int64/dims=2 29032 ns 29768 ns 0.98
array/reductions/reduce/Int64/dims=2L 83404 ns 84012 ns 0.99
array/reverse/1d 19358 ns 19586 ns 0.99
array/reverse/1dL 73191 ns 73513 ns 1.00
array/reverse/1dL_inplace 70186 ns 70240 ns 1.00
array/reverse/1d_inplace 12030 ns 11903 ns 1.01
array/reverse/2d 22357 ns 22635 ns 0.99
array/reverse/2dL 80735 ns 81092 ns 1.00
array/reverse/2dL_inplace 70866 ns 70857 ns 1.00
array/reverse/2d_inplace 14948 ns 14785 ns 1.01
array/sorting/1d 750014 ns 751370 ns 1.00
array/sorting/2d 194457 ns 194940 ns 1.00
array/sorting/by 926389 ns 928189 ns 1.00
cuda/graph/capture 36518 ns 36432 ns 1.00
cuda/graph/eager 33816 ns 33669 ns 1.00
cuda/graph/launch 13925 ns 14067 ns 0.99
cuda/synchronization/context/auto 2379.8888888888887 ns 2293.222222222222 ns 1.04
cuda/synchronization/context/blocking 897.1818181818181 ns 900.9772727272727 ns 1.00
cuda/synchronization/context/nonblocking 10913 ns 10465 ns 1.04
cuda/synchronization/stream/auto 880.1521739130435 ns 891.8181818181819 ns 0.99
cuda/synchronization/stream/blocking 774.6923076923077 ns 778.6057692307693 ns 0.99
cuda/synchronization/stream/nonblocking 8447.666666666666 ns 8676.333333333334 ns 0.97
integration/byval/reference 147639 ns 147744 ns 1.00
integration/byval/slices=1 148871 ns 148699 ns 1.00
integration/byval/slices=2 290288 ns 290312 ns 1.00
integration/byval/slices=3 432215 ns 432327 ns 1.00
integration/cudadevrt 105276 ns 105111 ns 1.00
integration/volumerhs 9610078 ns 9611992 ns 1.00
kernel/indexing 11387 ns 11493 ns 0.99
kernel/indexing_checked 12064 ns 12050 ns 1.00
kernel/launch 2481.222222222222 ns 2329.4444444444443 ns 1.07
kernel/occupancy 715.8235294117648 ns 674.1812080536913 ns 1.06
kernel/rand 14894 ns 15046 ns 0.99
latency/import 4043455833 ns 4052266943 ns 1.00
latency/precompile 5012987199 ns 5021620476 ns 1.00
latency/ttfp 4964884821 ns 4946268237 ns 1.00

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

@codecov

codecov Bot commented Oct 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.72%. Comparing base (4c4b3e5) to head (12e67b0).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3458      +/-   ##
==========================================
- Coverage   87.69%   85.72%   -1.97%     
==========================================
  Files         193      192       -1     
  Lines       20110    19823     -287     
==========================================
- Hits        17635    16994     -641     
- Misses       2475     2829     +354     

☔ 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.

@maleadt
maleadt merged commit 064b16c into main Oct 23, 2026
18 checks passed
@maleadt
maleadt deleted the tb/ka-fold-launch-tests branch October 23, 2026 19:41
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