Skip to content

fix: speedup GPU kernels that raise errors#4189

Draft
maxymnaumchyk wants to merge 2 commits into
scikit-hep:mainfrom
maxymnaumchyk:maxymnaumchyk/kernels-with-errors
Draft

fix: speedup GPU kernels that raise errors#4189
maxymnaumchyk wants to merge 2 commits into
scikit-hep:mainfrom
maxymnaumchyk:maxymnaumchyk/kernels-with-errors

Conversation

@maxymnaumchyk

@maxymnaumchyk maxymnaumchyk commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

A simple benchmark comparing old CUDA kernels and new ones that use a global variable to keep track of the errors:

=== awkward_RegularArray_getitem_next_array_regularize ===
  happy path: [2, 4, 0, 2, 4] (expect [2, 4, 0, 2, 4])  old==new ✓
  error paths OK
  [.cu     ] 0.000266 s/iter
  [compute ] 0.000435 s/iter
  data: 152.6 MB,  reg_to[:4]=[500, 501, 502, 503]

=== awkward_ListOffsetArray_toRegularArray ===
  happy path: size=3 (expect 3)  old==new ✓
  error paths OK
  [.cu     ] 0.000177 s/iter
  [compute ] 0.000878 s/iter
  data: 76.3 MB,  size=5 (expect 5)

=== awkward_ListArray_validity ===
  happy path OK (no exception)  old==new ✓
  error paths OK
  [.cu     ] 0.000273 s/iter
  [compute ] 0.001328 s/iter
  data: 152.6 MB

=== awkward_ListArray_getitem_next_at ===
  at=2:  [2, 7, 12] (expect [2, 7, 12])  old==new ✓
  at=-1: [4, 9, 14] (expect [4, 9, 14])  old==new ✓
  error paths OK
  [.cu     ] 0.000429 s/iter
  [compute ] 0.000681 s/iter
  data: 228.9 MB,  tocarry[:4]=[3, 13, 23, 33] (expect [3, 13, 23, 33])

@maxymnaumchyk maxymnaumchyk changed the title fix: speed up GPU kernels that raise errors fix: speedup GPU kernels that raise errors Jul 6, 2026
@codecov

codecov Bot commented Jul 6, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 13.33333% with 26 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.46%. Comparing base (722a1b9) to head (c3f03d5).
⚠️ Report is 17 commits behind head on main.

Files with missing lines Patch % Lines
src/awkward/_connect/cuda/_compute.py 13.33% 26 Missing ⚠️

❌ Your patch check has failed because the patch coverage (13.33%) is below the target coverage (98.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
Files with missing lines Coverage Δ
src/awkward/_connect/cuda/_compute.py 41.35% <13.33%> (-1.40%) ⬇️

... and 18 files with indirect coverage changes

@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown

The documentation preview is ready to be viewed at http://preview.awkward-array.org.s3-website.us-east-1.amazonaws.com/PR4189

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