Skip to content

TMA store path #9

Closed
Closed

Description

@feitreim

We have four TMA load paths and zero stores.

ThunderKittens ferro-kittens
load_async tma_load, tma_load_at, tma_load_2d, tma_load_2d_multicast_cg2
store_async —
store_add_async, store_min_async, store_max_async —
prefetch —
store_async_wait, store_commit_group, store_async_read_wait —

Any epilogue that wants to write a tile out currently has to go through whatever the calling kernel hand-rolls.

Upstream support at the pinned rev (b099f64) — partially available:

  • cp_async_bulk_tensor_{1,2,3,4,5}d_s2g — plain stores, all ranks. Available.
  • cp_async_bulk_commit_group, cp_async_bulk_wait_group, cp_async_bulk_wait_group_read — the commit/wait ops. Available.
  • Reduction stores (cp.reduce.async.bulk.tensor) are absent. No add/min/max variants anywhere in cuda-device.
  • Prefetch is absent.

So plain store_async plus the full commit/wait surface is straightforward. store_add_async — the one that makes split-K and multi-CTA reduction epilogues cheap — needs a ptx_asm! intrinsic written here, or an upstream contribution to cuda-oxide. ldst.rs already uses ptx_asm! for stmatrix, so there is precedent either way.

Suggest: plain stores and commit/wait in the first pass, reduction stores tracked separately once we know whether upstreaming is preferable to a local intrinsic.

Depends on #8.

Activity

  1. added
    enhancement
    area:memory
    on Jul 26, 2026
  2. feitreim commented on Jul 27, 2026

    @feitreim
    OwnerAuthor

    Acceptance: update examples/ as part of closing this.

    Both softmax and layernorm end with a TMA store.

    The examples crate (#18) exists so that "done" is checkable in the terms a kernel author cares about, rather than as a claim about a primitive nobody has tried to hold. Concretely, on closing this:

    • Delete any workaround or GAP fence in examples/src/ that this issue removes the need for, and replace it with the real API.
    • If a kernel becomes fully unblocked, move it from aspirational to compiles: flip its header, take it out of its feature gate, and confirm modal run modal_app.py::build builds it for sm_100a.
    • Update the status table and the blocked-on lists in examples/README.md.

    If the example still does not compile afterwards, that is a finding worth writing down — say what is still missing rather than leaving the README stale.

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:memoryenhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions