Skip to content

feat(wgmma): add f16 m64n128k16 async MMA - #1352

Merged
nihalpasham merged 4 commits into
NVIDIA:mainfrom
YeonwooSung:feat/wgmma-f16-m64n128k16
Nov 9, 2026
Merged

nihalpasham merged 4 commits into
NVIDIA:mainfrom
YeonwooSung:feat/wgmma-f16-m64n128k16

Conversation

@YeonwooSung

@YeonwooSung YeonwooSung commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

What This PR Does

Adds the f16 sibling (wgmma_mma_m64n128k16_f32_f16 -> wgmma.mma_async.sync.aligned.m64n128k16.f32.f16.f16) of the existing bf16 m64n128k16 warpgroup MMA, using the same 64-register [[f32; 8]; 8] accumulator layout and value-carrier lowering.

BEFORE:
  m64n128k16 WGMMA supported bf16 (`wgmma_mma_m64n128k16_f32_bf16`), but not f16

AFTER:
  Adds `wgmma_mma_m64n128k16_f32_f16` ──► `wgmma.mma_async.sync.aligned.m64n128k16.f32.f16.f16`
  (64 tied f32 registers, 0 spills verified by `ptxas --gpu-name sm_90a`)

Verification

  • PTX & Spill Verification (ptxas sm_90a): cargo test -p cuda-oxide-codegen --test wgmma_value_carrier_ptx verifies both single and chained f16 m64n128k16 groups assemble for sm_90a with 0 register spills.
  • Tests & CI Gates: cargo test -p dialect-nvvm -p mir-importer -p mir-lower --all-targets, just fmt-check, cargo clippy, and repository guards all pass.

Refs #338

Copy the bf16 m64n128 linear full-drain carrier. The instruction spelling
follows the existing f16 m64n64 form,
wgmma.mma_async.sync.aligned.m64n128k16.f32.f16.f16, with the same 64-value
f32 accumulator and 1, 1, 1, 0, 0 controls. Host tests check that PTX shape;
a Hopper run is still needed for numeric values.

Signed-off-by: YeonwooSung <[email protected]>
The handwritten NVVM op count is now 28, with 16 wgmma ops.

Signed-off-by: YeonwooSung <[email protected]>
@copy-pr-bot

copy-pr-bot Bot commented Oct 5, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@nihalpasham nihalpasham added the cuda-oxide SIMT programming model: rustc backend, cargo oxide, cuda-device, cuda-host, book label Oct 11, 2026
@nihalpasham nihalpasham added enhancement New feature or request cuda-feature A CUDA hardware/toolkit feature (TMA, tcgen05, WGMMA) intrinsics Device intrinsics and libdevice math mappings wgmma-value-path PR series threading WGMMA accumulators through registers (#605) labels Nov 3, 2026
@nihalpasham

Copy link
Copy Markdown
Collaborator

/ok to test 96ef4c4

@nihalpasham

Copy link
Copy Markdown
Collaborator

Thanks, adding the f16 m64n128k16 async WGMMA sibling alongside the existing bf16 m64n128k16 value-carrier path is clean and self-contained.

At 96ef4c42, rebased onto main and verified dialect-nvvm, mir-importer, mir-lower, and wgmma_value_carrier_ptx with ptxas --gpu-name sm_90a (0 register spills across single and chained m64n128k16 f16 groups). Merging once CI is green.

@nihalpasham
nihalpasham merged commit 136d378 into NVIDIA:main Nov 9, 2026
77 checks passed
@YeonwooSung
YeonwooSung deleted the feat/wgmma-f16-m64n128k16 branch November 10, 2026 01:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cuda-feature A CUDA hardware/toolkit feature (TMA, tcgen05, WGMMA) cuda-oxide SIMT programming model: rustc backend, cargo oxide, cuda-device, cuda-host, book enhancement New feature or request intrinsics Device intrinsics and libdevice math mappings wgmma-value-path PR series threading WGMMA accumulators through registers (#605)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants