Skip to content

Tracking: SM90/SM90a (Hopper) device intrinsics — FP8 WGMMA, DPX, setmaxnreg #338

Open

Description

@honeyspoon

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.wait are generated in crates/cuda-device/src/generated/cluster_barrier.rs, including relaxed and aligned variants.
  • fence.proxy.async is generated in crates/cuda-device/src/generated/mbarrier_extended.rs (fence_proxy_async_shared_cta plus 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.

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 ❌

References

Activity

  1. honeyspoon commented on Jul 18, 2026

    @honeyspoon
    ContributorAuthor

    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.toml and regenerate — see #406 for the full workflow.

  2. added
    tracking
    enhancement
    intrinsics
    cuda-feature
    on Jul 27, 2026
  3. added this to the cuda oxide v0.5.0 milestone on Oct 25, 2026
  4. added
    cuda-oxide
    on Oct 29, 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

    cuda-featurecuda-oxideenhancementintrinsicstracking

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions