Skip to content

FP8 element support #16

Open
Open

Description

@feitreim

The payoff for #2 and #12. Filed last because it is the largest item and the one most likely to reshape the abstractions above it — worth deferring until those have settled.

What is available at the pinned cuda-oxide rev (b099f64):

  • MMA: tcgen05_mma_shared / _tensor with KIND=2 (f8f6f4), plus tcgen05_mma_ws_{e4m3,e5m2}.
  • Conversion: cvt_rn_satfinite_e4m3x2_f32, cvt_rn_satfinite_e5m2x2_f32, and relu variants of both.

That is enough for a complete Fp8E4M3 / Fp8E5M2 element with no upstream work. If #2 and #12 are done properly, this is a new Element impl plus swizzle-atom arithmetic for a 1-byte element, and nothing else.

What is not available:

  • No f32 -> fp4/fp6 conversion intrinsics. Would need hand bit-packing.
  • No e8m0 conversion — the MXFP block-scale format. The smem->tmem scale copies exist (tcgen05_cp_*_b4x16_p64, tcgen05_cp_*_b6x16_p32) but producing the scales does not.

So: fp8 is fully unblocked, fp4/fp6 and MXFP block scaling are not. Scope this issue to fp8 and open a separate one for the narrower formats if they become interesting.

The non-obvious cost is that fp8 is a 1-byte element, so a 128-byte swizzle atom holds 128 columns rather than 64. Every SUBTILE_COLS derivation already goes through E::BYTES and should follow, but the MMA chunk geometry in the mma.rs header is written in bf16 terms and will need rederiving.

Depends on #2, #12.

Activity

  1. added
    enhancement
    area:types
    area:mma
    on Jul 26, 2026
  2. feitreim commented on Jul 29, 2026

    @feitreim
    OwnerAuthor

    Upgrade note (20a5616): b2709e8 admits additional packed FP8 and f16x2 conversions into the generated intrinsic ABI, and 518c209 adds f16x2/bf16x2-to-f32 unpack helpers in cuda-device.

    When this issue is picked up, re-inventory cuda_device::convert and the generated ABI instead of coding against the old list in the issue body. The main remaining ferro-kittens work is still the 1-byte Element/swizzle/MMA geometry; more of the pack/unpack edge is now upstream.

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

    area:mmaarea:typesenhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions