Skip to content

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

Closed

Description

@uurl

Motivation

The current counted WGMMA pipeline has backend coverage for two accumulator slots using wait_group<1>.

Before extending the production counted-loop recognizer and carrier to support a three-slot pipeline with wait_group<2>, we should first validate that the larger tied-accumulator lifetime remains register-resident on sm_90a.

The main question is whether the backend can keep the following values live inside a single convergent inline-PTX counted loop without introducing stack or spill traffic:

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

This deliberately isolates backend feasibility from production recognition and lowering changes.

Proposed validation

Extend the existing counted-pipeline carrier test with a three-slot variant.

The generated PTX should contain:

  • 1 wgmma.fence.sync.aligned
  • 3 wgmma.mma_async.sync.aligned.m64n64k16.f32.bf16.bf16
  • 3 wgmma.commit_group.sync.aligned
  • 3 wgmma.wait_group.sync.aligned 2
  • 1 final wgmma.wait_group.sync.aligned 0
  • 6 descriptor recurrences

The ptxas -arch=sm_90a --compile-only -v result must report:

  • 0 bytes stack frame
  • 0 bytes spill stores
  • 0 bytes spill loads

The probe should also verify that at least 96 registers remain live, matching the three 32-value accumulator slots.

Scope

This issue is only for the backend feasibility probe.

It does not change:

  • the production counted-loop recognizer
  • the counted WGMMA carrier/op
  • MIR lowering
  • the currently supported two-slot wait_group<1> production path

A production implementation for three slots should be handled separately once this feasibility check succeeds.

Activity

  1. added
    enhancement
    codegen
    cuda-feature
    on Aug 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    codegencuda-featureenhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions