tt-metal · interactive companions to the kernel dojo
Kernel
Tutorials.
Interactive, presentation-style walkthroughs of Tensix kernel programming concepts. Each one animates the real exercise kernels from the tt-metal kernel_dojo — step them, race them, break them.
🥋
Circular Buffer Dojo
The queues that connect your kernels: live simulations of
the tile-copy, eltwise, and pipelining exercises, plus the three bugs that catch everyone.
cb_reserve_backcb_push_backcb_wait_frontcb_pop_fronttile_regs_*add_tiles
open ▸
⚡
Throughput Dojo
Which resource are you actually waiting on? Multi-core scaling,
batched NoC reads, matmul K-accumulation, operand reuse and math fidelity — with the dojo's real
measured numbers, including the ones that contradict the obvious guess.
per-core runtime argsnoc_async_read_barriermatmul_tilesSrcOrder::Reversemath fidelityGB/s vs TFLOP/s
open ▸
🔀
Megatron and CCLs
The two Megatron matmul cuts and all nine ttnn collectives on
one zoomable vector canvas — cell color says which device the data came from, grey means summed —
plus seven rules for never mixing them up again, and the T3K ring animated: all_gather,
reduce_scatter and all_reduce hopping chip to chip. Editable Excalidraw source included.
column-parallelrow-parallelall_gatherreduce_scatterall_to_allmesh_partitionall_broadcast
open ▸
🧮
Online Safe Softmax
Why softmax overflows, the subtract-the-max fix and its
three-pass cost, and the one-multiply online repair, proved and animated on the row [2, 4, 3, 1].
The update is an associative merge, which is what makes long-sequence attention a cheap collective:
flash attention within a chip, ring attention across chips.
safe softmaxonline (m, d) updateflash attentionring attentioncorrection_blockcb_exp_max_diff
open ▸