Skip to content

Direct global to/from register load and store #11

Closed

Description

@feitreim

ThunderKittens has global_to_register.cuh with load / store at both warp and group scope — the non-TMA path for small, irregular, or unaligned accesses that do not justify a descriptor.

We only reach global memory through TMA into shared. Any epilogue that wants to write fp32 straight out of registers has to round-trip through a shared tile: pack to bf16, stmatrix, then TMA out, which is both a precision loss and a shared-memory allocation it should not need.

Also missing on the load side: there is no way to bring in a small operand (a bias vector, a scalar table, a ragged tail) without building a tensor map for it.

Straightforward once #8 gives a layout type to compute addresses from — this is coalesced vectorized loads/stores with the per-thread coordinate coming from the fragment layout, no descriptors involved.

Depends on #1, #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.

    flash_forward's epilogue and gemm's. The GEMM's is the one to read: fifteen lines of open-coded RegTile::coordinate arithmetic inside a GAP fence — exactly the index math this library exists to delete. Deleting it is the acceptance test.

    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