Expand description
The front-end bridge and the pinned pass order.
Structs§
- Chip
Lowering - A tensor-parallel program lowered for chips that share no fabric: one ordinary program a chip, and the tensors that
cross between them (
compile_program_to_chips). - Missing
Stage - One statement the whole-program walk saw and could not turn into a section, and why.
- Plan
Filter - Every calibration candidate of a source on a target — the compiler’s own choice plus the best plan of
each reader arrangement, each run through the SAME passes. A measurement harness’s facility, never a
compiler decision.
Restrict the plans a candidate search may pick from — the knobs a measurement campaign varies one at a
time. A knob left
Noneis the compiler’s own choice. - Program
Lowering - What the whole-program front end made of a source.
- Stage
Names - The source-level names and recognized fills of ONE lifted statement — the binder, then every operand
in
TensorOpSpec::insorder. A fill isFill::Unknownfor a tensor the program never declares, which is exactly the activations a composition produces and consumes.
Enums§
- Candidate
Kind - A calibration candidate: the compiler’s own choice, or the best plan of one reader arrangement.
- Results
- ★ WHAT OUTSIDE A PROGRAM READS ITS TENSORS, the program’s caller says. Its host may read any tensor it is handed, and a
program that is one of a deployment’s has readers in the next program that its own statements never show. So a
tensor only the next statement reads is forwarded (
super::passes::forward) only where the caller has declared what else is read; otherwise every tensor a statement names is stored, as the program wrote it. - Section
Certification - Where a composed program’s sections are certified.
Constants§
- PASS_
ORDER - The pinned order. Every entry is idempotent on its own output and leaves
validate()holding.
Functions§
- build_
candidate - The program candidate
coftemplatebuilds: its plan applied, placed, fused as the candidate says, sized, handshaken, persisted and verified. What the plan search priced in closed form is what this emits. - build_
candidate_ uncertified build_candidateshort of its certificate: the candidate tiled, placed, sized and scheduled — what a cycle twin times.- calibration_
candidates - calibration_
candidates_ matching - The best candidate of each arrangement AMONG the plans the filter allows.
- check_
datatypes - ★ A LOWERING COMPUTES ONLY IN DATATYPES ITS CHIP HAS. Every buffer a
Genericstage reads or writes, every index an indirect tile address waits on, and every tensor moved into or out of one of those buffers must be a precision the target’s elementwise datapath computes in (or its fp32 accumulation width). Without this an index lowered for an RDU rodeInt64— a type the PCU does not have — and evaluated exactly, because nothing asked the chip. It gates what the COMPILER chooses — every programsuper::link::linkreturns; a program built by hand is its author’s claim, checked by the passes as it stands. - compile_
program_ to_ chips - ★ A CHIP BOUNDARY IS A TRANSFER, NOT A SHARED MEMORY.
compile_program_to_spatial_tplowers a tensor-parallel program as ONE program over its chips, every section followed by a barrier the chips all join — the shape of a machine whose chips share one fabric. Boards joined by a link share nothing: each runs its own program, and a tensor one board writes and the other reads crosses the link between them. So each chip’s statements are lowered alone, in order, as an ordinary one-chip program, every tensor narrowed by the interval the WHOLE program proves for it, and what crosses is listed (super::tensor_parallel::transfers). An all-reduce is then what it is over a link: the partials cross to the chip that folds them, and the fold is that chip’s own addition. - compile_
program_ to_ chips_ returning compile_program_to_chipsfor a program whose results are declared (seecompile_program_to_spatial_returning): on each chip, a tensor only the next statement reads — no statement of any chip, noShow, no carried state, nothingresultsnames — is forwarded.- compile_
program_ to_ spatial - English → the WHOLE tensor program as sections of one spatial program.
- compile_
program_ to_ spatial_ agreeing compile_program_to_spatialfor one program of a DEPLOYMENT:densenames the tables the deployment’s other programs lay out as matrices (dense_tables_of), so a table one program writes and another reads is laid out alike in both — the agreementdense_tablesmakes inside a program, made across the programs that share it.- compile_
program_ to_ spatial_ agreeing_ stored compile_program_to_spatial_agreeingfor a deployment whose weightsq8are stored Q8_0.- compile_
program_ to_ spatial_ returning compile_program_to_spatialfor a program whose RESULTS are declared:resultsnames what outside the program reads — its host, or the next program of a deployment — besides what it shows and the state it carries, and every other tensor only the next statement reads is forwarded (super::passes::forward).- compile_
program_ to_ spatial_ stored compile_program_to_spatialfor a program whose weightsq8the deployment STORES Q8_0: a one-row product over one of them reads its int8 values and per-block scales as they are stored, rather than a bf16 copy (super::passes::from_q8). A product the fold cannot tile reads the weight dense.- compile_
program_ to_ spatial_ tp compile_program_to_spatialfor a TENSOR-PARALLEL program (seesuper::tensor_parallel): every section runs on the chipmanifestgives what it computes, and each collective’s fold statements are one all-reduce section.- compile_
program_ to_ spatial_ tp_ agreeing compile_program_to_spatial_tpfor one program of a deployment, agreeing with its other programs on the tables laid out dense (seecompile_program_to_spatial_agreeing).- compile_
program_ to_ spatial_ tp_ agreeing_ stored compile_program_to_spatial_tp_agreeingfor a deployment whose chip-local weight slicesq8are stored Q8_0 — each chip’s slice read as its int8 values and scales (super::passes::from_q8).- compile_
to_ spatial - compile_
to_ spatial_ with - English → a verified spatial program.
- dense_
tables_ of - The tables
sourcelays out DENSE (super::link::dense_tables) — what a deployment’s other programs must agree with. - lower_
program_ with - The whole tensor program lowered with its sections certified as
sectionssays —lower_program’s two paths, public so a lock can hold them to one answer. - program_
links - The dataflow the walk found, for a caller that wants the links without re-walking.
- run_
passes - Run the pinned passes to a verified program.
- run_
passes_ through_ tile - The passes through
tile: a template fused and planned, nothing placed — where two planned sections are joined (super::passes::forward) before the rest run on the joined one. - run_
passes_ uncertified - Every pass but the last, which certifies: the program tiled, placed, sized and scheduled — a SECTION of a
composition, which is certified as part of the composed program (
composedrops a section’s own certificate). - template_
from_ source - template_
from_ source_ with - English → a template (phase
Template) with the given numerics policy. - template_
from_ spec - A template from a matmul spec directly (external data with declared ranges).
- value_
ranges_ of - The proven interval of every integer tensor of
source(super::value_range::value_ranges), by name — the ranges each matmul’s operand precision is chosen from.
Type Aliases§
- Pass
- A pass: a pure function of the program and its target.