Skip to main content

Module programs

Module programs 

Source
Expand description

programs — the LOGOS source of the reference programs the spatial lane is anchored on.

★ WHY A PROGRAM AND NOT A KERNEL. Everything else in spatial/ describes computation as IR; these are the ORDINARY LOGOS programs the IR is built from, kept as source so the anchor is the language rather than any lowering of it. The GEMM oracle below is a scalar integer matmul: compiled to C it gives a card-free ground truth for every Tenstorrent number, and recognized by tensor_recognize it is the same program the spatial pipeline lowers — which is what makes “the accelerator agrees with the oracle” a statement about one program rather than two.

Salvaged from codegen_tt/matrix.rs during the retirement; codegen_tt re-exports the name so callers are unmoved.

Constants§

GEMM_ORACLE_LOGOS

Functions§

gemm_program
The canonical LOGOS matmul the recognizer lifts: C(m×n) = A(m×k)·B(k×n) over Seq of Int with the deterministic fills a[p] = (p % 7) - 3, b[p] = (p % 11) - 5, and a Show checksum of C — the same program the spatial locks anchor on (tests/common/spatial.rs), here so a report generator can lower it without depending on a test tree.