Skip to content

Let the driver choose the CUDA register count - #9260

Merged
alexreinking merged 2 commits into
mainfrom
abadams/no_cuda_register_cap
Jul 31, 2026
Merged

Let the driver choose the CUDA register count#9260
alexreinking merged 2 commits into
mainfrom
abadams/no_cuda_register_cap

Conversation

@abadams

@abadams abadams commented Jul 30, 2026

Copy link
Copy Markdown
Member

The cuda runtime capped kernels at 64 registers per thread when loading a module, with an HL_CUDA_JIT_MAX_REGISTERS environment variable as an escape hatch. Capping registers trades spilling against occupancy, and ptxas has more information about the kernel and the device than we do.

Two apps set the escape hatch to 256 to compensate. Both are removed here; on an sm_86 device the 256 cap is now slightly slower than letting the driver decide.

abadams and others added 2 commits July 30, 2026 11:51
The cuda runtime capped kernels at 64 registers per thread when loading a
module, with an HL_CUDA_JIT_MAX_REGISTERS environment variable as an escape
hatch. Capping registers trades spilling against occupancy, and ptxas has more
information about the kernel and the device than we do.

Two apps set the escape hatch to 256 to compensate. Both are removed here; on
an sm_86 device the 256 cap is now slightly slower than letting the driver
decide.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@codecov

codecov Bot commented Jul 31, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.17%. Comparing base (42a90e8) to head (7aa69ba).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9260      +/-   ##
==========================================
+ Coverage   69.92%   70.17%   +0.25%     
==========================================
  Files         255      255              
  Lines       78895    78895              
  Branches    18865    18865              
==========================================
+ Hits        55166    55366     +200     
+ Misses      17928    17844      -84     
+ Partials     5801     5685     -116     

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@alexreinking

Copy link
Copy Markdown
Member

Merging without two macOS workflows to keep resources free. They can't run this code anyway.

@alexreinking
alexreinking merged commit 1ac8388 into main Jul 31, 2026
26 of 29 checks passed
@alexreinking
alexreinking deleted the abadams/no_cuda_register_cap branch July 31, 2026 13:51
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.

2 participants