Skip to content

[CUDA][TIRx] Allow collector-A-only SM107 block-scale MMA and open cp.async wait_group immediates - #20271

Merged
spectrometerHBH merged 1 commit into
apache:mainfrom
spectrometerHBH:pr/collector-a-only-mma-open-wait-group
Sep 5, 2026
Merged

[CUDA][TIRx] Allow collector-A-only SM107 block-scale MMA and open cp.async wait_group immediates#20271
spectrometerHBH merged 1 commit into
apache:mainfrom
spectrometerHBH:pr/collector-a-only-mma-open-wait-group

Conversation

@spectrometerHBH

Copy link
Copy Markdown
Contributor

Summary

Two T.ptx table follow-ups to #20266 (python/tvm/backend/cuda/ptx/table.py).

  • Collector-A-only SM107 block-scale MMA. On the SM107 tcgen05.mma block-scale entries collector_b becomes optional, so the activation-stationary FP8 form with collector A alone is accepted alongside the A+B form.
  • Open cp.async wait-group immediates. cp.async.wait_group N and cp.async.bulk.wait_group[.read] N no longer restrict N to 0..7. PTX ISA 9.7.10.28.3.3 / 9.7.10.28.6.2 define N only as an integer constant with no value domain, and CUDA 13.4 ptxas at sm_107a accepts values beyond 7 (measured: 8, 9, 16, 255; the bulk .read form also 2147483647 and -1). Each call-site constant still becomes its own helper; enumeration and full-table certification sample the open operand at 0 and certify the instruction shape.

Tests (tests/python/tirx/codegen/test_ptx_dialect.py)

  • New test_ptx_tcgen05_mma_block_scale_collector_a_without_block_size: SM107 activation-stationary FP8 accepts collector A without .block*.
  • Wait-group tests updated for the open immediate.

Downstream

Needed by the Rubin masked grouped GEMM and block-scaled fused-MoE SwiGLU ports in mlc-ai/tirx-kernels.

….async wait_group immediates

- tcgen05.mma block-scale SM107 entries: collector B is optional, so the
  collector-A-only form is accepted alongside the A+B form.
- cp.async.wait_group / cp.async.bulk.wait_group N is an OPEN immediate. PTX
  ISA 9.7.10.28.3.3 / 9.7.10.28.6.2 define N only as an integer constant with
  no value domain, and CUDA 13.4 ptxas at sm_107a accepts values beyond 7
  (8, 9, 16, 255; the bulk .read form also 2147483647 and -1). Enumeration
  and full-table certification sample the operand at 0 and certify the
  instruction shape.

Squash of:
- [CUDA][TIRx] Allow collector-A-only SM107 block-scale MMA
- feat(lower-tirx): open cp.async wait-group immediates
@spectrometerHBH
spectrometerHBH merged commit 5e49b34 into apache:main Sep 5, 2026
8 checks passed
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