Expand description
The calibrated cycle model — what makes “streamed vs multicast vs blocked” an EMERGENT plan decision.
Every quantity is computed FROM a candidate plan’s structure (tile-MACs, DRAM tile reads, circular-buffer
hand-offs, multicast blocks, semaphores, kernel classes); the model turns them into predicted device cycles
with a handful of constants. On Wormhole those constants are FITTED to the rows of the ttsim GEMM ledger
(benchmarks/silicon/tenstorrent_gemm.json, written only by scripts/tt-gemm-ledger.py from real runs —
never typed), within matched-knob groups only. Other targets carry an uncalibrated model whose absolute
numbers are never asserted — only its structural monotonicity is. No strategy enum exists anywhere: the
tile pass enumerates candidate plans and keeps the minimum of this function, and fuse_readers
re-derives the same comparison for the fused/unfused pair.
Structs§
- Calibration
Point - One ttsim ledger row as a calibration point.
- Cost
Breakdown - A plan’s cost, term by term, with the initiation interval its steady state runs at.
- Cycle
Model - Per-cycle-model constants. Names mirror the terms of
CycleModel::cycles. - Gemm
Plan - A candidate plan for a GEMM of
mt × nt × kttiles: the streaming point family or a blocked point. - Measured
Work - The work meter recorded beside a calibration point: what the machine did, in counts it can report.
- Plan
Desc - The plan a ledger row printed.
- Plan
Quantities - The structural quantities of one candidate plan (per the busiest site, plus whole-program totals).
Enums§
- Operand
Sharing - How an arrangement shares its operands across the mesh — the thing that decides DRAM traffic.
- Pace
Bound - Which resource sets the pipeline’s pace.
Constants§
- CALIBRATION_
JSON - Path of the ttsim GEMM ledger, relative to the repo root.
Functions§
- dram_
tiles - How many DRAM tile-reads an arrangement costs, given the output tile grid and the reduction depth.
- is_
streaming - load_
calibration_ points - Parse the ledger’s CURRENT rows into calibration points. A row whose printed plan the model cannot
quantify (a vendor example with an unknown blocking, a ttnn op) is kept with
block: Noneand excluded from the fit byquantities_for_point. - quantities_
for_ gemm - Structural quantities of a candidate plan, analytically from the plan (the same formulas
PlanSummary::dram_tiles_readreproduces from the built structure). - quantities_
for_ point - The quantities of a recorded point on
target, when its plan is fully specified AND its knobs are ones the compiler emits on this target (the target’s declared fidelity; fp32 accumulate on or off). A row at a fidelity the pipeline never chooses is a comparison, not a calibration point. - streaming_
plan - The streaming plan (one tile per work item, per-tile FIFOs).
- vendor_
example_ blocking - The blocking the tt-metal
matmul_multicore_reuse[_mcast]programming examples choose for a shape: a transcription ofbmm_op_utils::get_large_matmul_params(the examples’ sharedbmm_op.hpphelper under tt_metal/programming_examples/matmul) at the examples’ fixedin0_block_w = 2, so those ledger rows (whose host prints no config line) become fully specified calibration points. Returns (per_core_M, per_core_N, out_subblock_h, out_subblock_w);Nonewhere the vendor returns all zeros.