Skip to content

test(codegen): validate spill-free three-slot WGMMA counted pipeline - #1011

Merged
nihalpasham merged 1 commit into
NVIDIA:mainfrom
uurl:test/wgmma-three-slot-counted-pipeline-carrier
Aug 19, 2026
Merged

nihalpasham merged 1 commit into
NVIDIA:mainfrom
uurl:test/wgmma-three-slot-counted-pipeline-carrier

Conversation

@uurl

@uurl uurl commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Closes #1010

Summary

Extend the existing counted WGMMA pipeline backend probe with a three-slot variant using wait_group<2>.

The test keeps the production-independent structure of the existing two-slot carrier and exercises a larger convergent inline-PTX lifetime containing:

  • 96 tied f32 accumulator values
  • 6 descriptor bases
  • 6 descriptor deltas
  • 1 trip count
  • 3 WGMMA groups per counted-loop iteration
  • wait_group<2> throttling
  • final wait_group<0>

This PR intentionally does not modify the production counted-loop recognizer or lowering path. Its purpose is to resolve the backend register-pressure question before adding three-slot production support.

Results

On sm_90a, ptxas reports:

two-slot baseline:
    0 bytes stack frame
    0 bytes spill stores
    0 bytes spill loads
    Used 90 registers

three-slot probe:
    0 bytes stack frame
    0 bytes spill stores
    0 bytes spill loads
    Used 122 registers

The three-slot carrier therefore remains fully register-resident despite keeping 96 tied accumulator values and 13 control values live across the counted PTX loop.

Validation

cargo test -p cuda-oxide-codegen \
  --test wgmma_counted_pipeline_carrier_ptx -- --nocapture

cargo fmt --all -- --check

git diff --check

Result:

2 passed; 0 failed

The three-slot ptxas probe reports zero stack and zero spill traffic.

Scope

This PR only extends:

crates/cuda-oxide-codegen/tests/wgmma_counted_pipeline_carrier_ptx.rs

It does not change production recognition or lowering.

A follow-up PR can use this result to add production support for:

2 slots + wait_group<1>
3 slots + wait_group<2>

@nihalpasham nihalpasham added enhancement New feature or request codegen Device code-generation pipeline (Rust MIR to IR to PTX) cuda-feature A CUDA hardware/toolkit feature (TMA, tcgen05, WGMMA) labels Aug 19, 2026
@nihalpasham

Copy link
Copy Markdown
Collaborator

@nihalpasham
nihalpasham merged commit 412a515 into NVIDIA:main Aug 19, 2026
108 of 116 checks passed
@uurl
uurl deleted the test/wgmma-three-slot-counted-pipeline-carrier branch August 19, 2026 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

codegen Device code-generation pipeline (Rust MIR to IR to PTX) cuda-feature A CUDA hardware/toolkit feature (TMA, tcgen05, WGMMA) enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Validate spill-free three-slot WGMMA counted pipeline on sm_90a

2 participants