Skip to content

feat(intrinsics): admit standard-metadata Ampere-float sparse MMA - #1561

Open
YeonwooSung wants to merge 3 commits into
NVIDIA:mainfrom
YeonwooSung:feat/sparse-mma-ampere-float-metadata
Open

YeonwooSung wants to merge 3 commits into
NVIDIA:mainfrom
YeonwooSung:feat/sparse-mma-ampere-float-metadata

Conversation

@YeonwooSung

Copy link
Copy Markdown
Contributor

Summary

This replaces closed #1355. That PR special-cased one bf16 form. This one adds metadata = standard | ordered to the Ampere-float sparse family, on the same model as integer sparse MMA. Identity, the PTX floor, and the plain 16-bit metadata rule come from that axis. There is no per-form predicate.

The standard shard lists the same eight variants as the ordered shard, in ABI order:

  • m16n8k8 f32 tf32
  • m16n8k16 f32 tf32, f32 bf16, f16 f16, f32 f16
  • m16n8k32 f32 bf16, f16 f16, f32 f16

Ordered records stay on ABI i1018..=i1025 and PTX 8.5. The new records are i1039..=i1046, PTX 7.1, sm_80. kind::f8f6f4 is unchanged.

Plain 16-bit standard metadata documents the codes the 5090 honors: 0x4, 0x6, 0x8, 0x9, 0xc, 0xd, and 0xe (the six ascending codes plus 0x6). The ISA lists twelve. tf32 standard metadata stays on the existing rule, and the oracle only feeds tf32 0x4 and 0xe.

Evidence

Recorded on an RTX 5090.

  • LLVM: nightly-2026-10-11 sysroot llc, SHA-256 7534b0236b9b26c7e6910548038b2285ee1bb5908e4700764dc78a7a1a54b449, rustc 6f5da406b56c2db6607202b63daee73aa8c61297. Selected-evidence probe assembled all eight forms for sm_80 with CUDA 13.3.33 ptxas (7fdd01a4…). ptxas prints an advisory that .sp::ordered_metadata may be faster on future architectures. Assembly still succeeds, and the standard spelling is what this family admits.
  • libNVVM: CUDA 13.3.33 libnvvm.so.4.0.0, SHA-256 b6a5db233133fb0ed693f8cb8aeb1d405254ce0ab10364478985292ec98cfcf0, build-id 2330c0. nvJitLink SHA-256 3ba1e744…. These are the 13.3.33 redistributable binaries, not a hash copied from a sibling record.
  • GPU oracle sparse_mma_standard_float: all eight forms, selectors 0–3 on the 2-register forms and 0–1 on the 4-register forms (24 calls), every lane against a host GEMM. cargo oxide run sparse_mma_standard_float --arch sm_120 and the same command with --materialize-cubin both printed SUCCESS.

runtime_validation for the standard shard is executed from that run.

Test plan

  • cargo test -p cuda-intrinsics-gen --bin cuda-intrinsics-gen
  • cargo run -p cuda-intrinsics-gen -- check
  • selected-evidence probe of all eight new ids, nightly-2026-10-11 llc and CUDA 13.3.33 ptxas
  • cargo oxide run sparse_mma_standard_float --arch sm_120 on an RTX 5090
  • cargo oxide run sparse_mma_standard_float --arch sm_120 --materialize-cubin on an RTX 5090

The Ampere-float sparse admission now carries metadata = standard | ordered.
Identity, PTX floor, and the plain 16-bit metadata rule come from that axis.
Ordered records keep their ids, ABI i1018..=i1025, and PTX 8.5 spelling.

Signed-off-by: YeonwooSung <neos960518@gmail.com>
The same eight Ampere-float shapes now admit metadata = standard, with
identity, PTX 7.1, and the 16-bit metadata rule derived from that axis.
Ordered records stay on ABI i1018..=i1025. Plain 16-bit metadata
documents 0x4, 0x6, 0x8, 0x9, 0xc, 0xd, and 0xe.

Evidence is nightly-2026-10-11 llc and CUDA 13.3.33 libNVVM. On an RTX
5090 the eight forms assembled, and the host-GEMM oracle matched all
32 lanes through both the default route and libNVVM cubin materialization.

Signed-off-by: YeonwooSung <neos960518@gmail.com>
The oracle covers all eight standard forms. Two-register forms run
selectors 0 through 3, and four-register forms run 0 and 1. 16-bit
metadata cycles 0x4, 0x6, 0x8, 0x9, 0xc, 0xd, and 0xe. tf32 stays on
0x4 and 0xe. Each lane is compared with a host GEMM.

Signed-off-by: YeonwooSung <neos960518@gmail.com>
@copy-pr-bot

copy-pr-bot Bot commented Oct 20, 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.

This branch has not been deployed

No deployments
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.

1 participant