Repository navigation
Description
What problem does this solve?
cuda-oxide has substantial Hopper support on main — WGMMA (bf16/f16/tf32), TMA (1D–5D g2s/s2g + multicast), thread block clusters, mbarrier, and tcgen05. However, FP8 WGMMA variants, additional WGMMA shapes, DPX instructions, and several Hopper-specific instructions are missing. This tracks filling those gaps.
Split from #335 for per-architecture tracking. See also: SM80 (#274), SM89 (#337), SM100 (#339).
Status (2026-07-27)
Two Phase 3 items landed via the #406 intrinsics autogen (boxes checked below):
barrier.cluster.arrive/barrier.cluster.waitare generated incrates/cuda-device/src/generated/cluster_barrier.rs, includingrelaxedandalignedvariants.fence.proxy.asyncis generated incrates/cuda-device/src/generated/mbarrier_extended.rs(fence_proxy_async_shared_ctaplus generic acquire/release cluster-scope variants).
On the redux item: the integer redux.sync add/min/max/and/or/xor forms shipped earlier (#223, #258); the f32 hardware forms are still missing. #475 added shuffle-based f32/f64 warp reduce utilities, which are a software alternative rather than redux.sync on f32.
Everything else (FP8 WGMMA, additional WGMMA shapes, setmaxnreg, DPX, cp.async.bulk.prefetch.tensor, cp.reduce.async.bulk) remains unimplemented. WGMMA on main still covers only m64n64k16 for f16/bf16/tf32. New items go through the #406 workflow: append to intrinsics/overlay/*.toml + intrinsics/abi-v1.toml and regenerate.
Scope
Each item follows the established 4-layer pattern (cuda-device > dialect-nvvm > mir-importer > mir-lower) plus lowering tests.
Phase 1: FP8 WGMMA variants (sm_90a)
Hopper's warpgroup-level MMA with FP8 inputs. cuda-oxide already has WGMMA for bf16/f16/tf32 but not FP8. Requires SM89 FP8 type support (#337 Phase 1) first.
-
wgmma.mma_async.*.f32.e4m3.e4m3(f32 accumulator, e4m3 inputs) -
wgmma.mma_async.*.f32.e5m2.e5m2(f32 accumulator, e5m2 inputs) -
wgmma.mma_async.*.f32.e4m3.e5m2(mixed FP8 inputs) -
wgmma.mma_async.*.f32.e5m2.e4m3(mixed FP8 inputs)
Note: FP8 WGMMA is the highest-throughput FP8 path on Hopper, sourcing one or both operands from shared memory via TMA.
Phase 2: Additional WGMMA shapes (sm_90a)
Remaining WGMMA matrix shapes beyond the current m64n64k16 variants.
-
wgmma.mma_async.m64n128k16.f32.f16(wider N) -
wgmma.mma_async.m64n128k16.f32.bf16(wider N) -
wgmma.mma_async.m64n256k16.f32.f16(widest N) -
wgmma.mma_async.m64n256k16.f32.bf16(widest N) -
wgmma.mma_async.m64n128k8.f32.tf32 -
wgmma.mma_async.m64n256k8.f32.tf32 -
wgmma.mma_async.m64n8k16.f32.f16(narrow N for epilogue) -
wgmma.mma_async.m64n16k16.f32.f16 -
wgmma.mma_async.m64n24k16.f32.f16 -
wgmma.mma_async.m64n32k16.f32.f16 -
wgmma.mma_async.m64n48k16.f32.f16
Phase 3: Hopper-specific instructions (sm_90 / sm_90a)
Instructions unique to Hopper that are not yet implemented.
-
setmaxnreg— dynamic register allocation (sm_90a) -
barrier.cluster.arrive/barrier.cluster.wait— cluster-wide barrier (generated via Generate CUDA intrinsic APIs and lowering from pinned LLVM 22 data #406, incl.relaxed/alignedvariants) -
fence.proxy.async— async proxy fence (generated via Generate CUDA intrinsic APIs and lowering from pinned LLVM 22 data #406) -
cp.async.bulk.prefetch.tensor— TMA prefetch (global → L2, no shared memory) -
cp.reduce.async.bulk— async reduction copy (sm_90+) -
redux.sync.{add,min,max}.f32— f32 redux variants (integer forms landed in feat: add redux.sync.add warp reduction (sm_80+) #223/feat: add redux.sync integer min/max/and/or/xor warp reductions (sm_80+) #258)
Phase 4: DPX (Dynamic Programming) instructions (sm_90+)
Three-way comparison and fused add-max operations for genomics and dynamic programming workloads.
-
vimnmx.{s32,u32}— three-way min/max (max(min(a,b), c)) -
vimax3.{s32,u32}— three-way max (max(a, max(b, c))) -
vimin3.{s32,u32}— three-way min (min(a, min(b, c))) -
viaddmax.{s32,u32}— fused add-max (max(a+b, c)) -
viaddmin.{s32,u32}— fused add-min (min(a+b, c))
Note: DPX instructions accelerate Smith-Waterman alignment and similar DP algorithms by 7× vs discrete ops on SM80. They are Hopper-exclusive.
What already exists on main
| Feature | Status |
|---|---|
| WGMMA (bf16/f16/tf32, m64n64k16) | ✅ |
| TMA (1D–5D, g2s/s2g, multicast) | ✅ |
| Thread block clusters | ✅ |
| mbarrier (init/arrive/wait/inval) | ✅ |
| elect.sync | ✅ |
| barrier.cluster.arrive/wait | ✅ (#406) |
| fence.proxy.async | ✅ (#406) |
| redux.sync (integer) | ✅ (#223/#258) |
| FP8 WGMMA | ❌ |
| Additional WGMMA shapes | ❌ |
| setmaxnreg | ❌ |
| DPX instructions | ❌ |
Activity
honeyspoon commentedon Jul 18, 2026
Update: Upstream PR #406 merged, autogenerating all CUDA intrinsic APIs from pinned LLVM 22 data (781 admitted contracts). Many intrinsics tracked here are now covered by the generator. To add any remaining ones, append to
intrinsics/overlay/*.toml+intrinsics/abi-v1.tomland regenerate — see #406 for the full workflow.test(examples): pin DPX-shaped integer min/max chains to native PTX m…
feat(intrinsics): add extended integer min/max (DPX relu and 16x2 forms)
test(examples): pin DPX-shaped integer min/max chains to native PTX m…
feat(intrinsics): add extended integer min/max (DPX relu and 16x2 forms)
test(examples): pin DPX-shaped integer min/max chains to native PTX m…
test(examples): pin DPX-shaped integer min/max chains to native PTX m…
feat(intrinsics): add extended integer min/max (DPX relu and 16x2 forms)
feat(intrinsics): add extended integer min/max (DPX relu and 16x2 for…
feat(wgmma): add f16 m64n128k16 async MMA (#1352)