You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Generic map mechanism and the standard elementwise op set #5
ThunderKittens factors elementwise ops into op structs in common/base_ops.cuh:
zero one pos_infty neg_infty exp exp2 log log2 abs relu neg sqrt rsqrt
copy copy2 sum sub mul div min fma_AxBtC fma_AxCtB
applied through generic unary_map / bin_map / row_map / col_map, then instantiated for register tiles, register vectors, shared tiles, and shared vectors. One op struct, four type families, free.
What we have. Hand-written, on RegVec / RegTile only: exp2, max, sub, add_assign, mul_assign, splat, zero, plus free exp2_approx / exp2_hw / log2_approx / fmax / fmin.
Missing:divsqrtrsqrtabsrelunegloglog2minonepos_inftyneg_inftycopy, both fma forms, and every broadcast-operand form (add_rowadd_colsub_rowsub_colmul_rowmul_coldiv_rowdiv_colbroadcast_rowbroadcast_col). No generic entry point at all, so each new op is hand-written against the fragment map.
Highest ops-per-line item in the backlog — the mechanism collapses ~30 missing functions into a trait plus small impls.
The standard op set as unit structs, plus named wrappers so t.exp2() still reads as it does today.
Keep exp2_approx and exp2_hw as distinct ops. They have different rounding, and picking between them is a numerics decision, not an implementation detail.
Depends on #1. Shared-tile instantiation is #13's problem; register types only here.
Acceptance: update examples/ as part of closing this.
All three aspirational kernels (flash_forward, softmax, layernorm) call into this. None of them is unblocked by it alone, but each should lose several entries from its gap list.
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.
Activity
feitreim commentedon Jul 27, 2026
Acceptance: update
examples/as part of closing this.All three aspirational kernels (
flash_forward,softmax,layernorm) call into this. None of them is unblocked by it alone, but each should lose several entries from its gap list.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:
GAPfence inexamples/src/that this issue removes the need for, and replace it with the real API.aspirationaltocompiles: flip its header, take it out of its feature gate, and confirmmodal run modal_app.py::buildbuilds it forsm_100a.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.
Shared to register load: ldst::load_fragment (#33)
SwizzledChunks spans stacked subtiles (#35)
examples: the reductions, and what is left after #5 and #6
Reductions: generic row/column/whole-tile folds over a ReduceOp (#37)
Scalar-operand maps over the existing BinaryOp set
examples: what the scalar-map probe says about #31's framing
Scalar-operand maps: scale, shift, and a free rsqrt over the existing…
In-place map variants, and what they are actually worth (#31) (#58)
Sweep the register ladder instead of measuring two widths (#60)
Sweep the register ladder instead of measuring two widths (#60) (#62)