Skip to main content

Module pipeline

Module pipeline 

Source
Expand description

The front-end bridge and the pinned pass order.

Structs§

ChipLowering
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).
MissingStage
One statement the whole-program walk saw and could not turn into a section, and why.
PlanFilter
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 None is the compiler’s own choice.
ProgramLowering
What the whole-program front end made of a source.
StageNames
The source-level names and recognized fills of ONE lifted statement — the binder, then every operand in TensorOpSpec::ins order. A fill is Fill::Unknown for a tensor the program never declares, which is exactly the activations a composition produces and consumes.

Enums§

CandidateKind
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.
SectionCertification
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 c of template builds: 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_candidate short 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 Generic stage 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 rode Int64 — a type the PCU does not have — and evaluated exactly, because nothing asked the chip. It gates what the COMPILER chooses — every program super::link::link returns; 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_tp lowers 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_chips for a program whose results are declared (see compile_program_to_spatial_returning): on each chip, a tensor only the next statement reads — no statement of any chip, no Show, no carried state, nothing results names — 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_spatial for one program of a DEPLOYMENT: dense names 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 agreement dense_tables makes inside a program, made across the programs that share it.
compile_program_to_spatial_agreeing_stored
compile_program_to_spatial_agreeing for a deployment whose weights q8 are stored Q8_0.
compile_program_to_spatial_returning
compile_program_to_spatial for a program whose RESULTS are declared: results names 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_spatial for a program whose weights q8 the 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_spatial for a TENSOR-PARALLEL program (see super::tensor_parallel): every section runs on the chip manifest gives what it computes, and each collective’s fold statements are one all-reduce section.
compile_program_to_spatial_tp_agreeing
compile_program_to_spatial_tp for one program of a deployment, agreeing with its other programs on the tables laid out dense (see compile_program_to_spatial_agreeing).
compile_program_to_spatial_tp_agreeing_stored
compile_program_to_spatial_tp_agreeing for a deployment whose chip-local weight slices q8 are 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 source lays 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 sections says — 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 (compose drops 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.