Module compile

Module compile 

Source
Expand description

2026-09-28: Plan to program. layout states the storage the emitters’ kernels need (the residual stream and the logits bound to the model’s buffers, in-place outputs, packed outputs); the caller places the rest in one workspace allocated at boot; compile asks each group’s emitter for its launches.

Owner: model-layers circuit executor. Invariants:

  • Every stream edge (a block’s stream_in or stream_out) is the model’s hidden buffer, updated in place, as the legacy layers update it; every declared output is the model buffer its producer writes (logits, tokens).
  • The program has exactly plan.launches() launches; any other count is a compile error.
  • A group’s weights are checked against the format its nodes were resolved to.

Re-exports§

pub use super::fixed::DraftFixed;
pub use super::fixed::Fixed;

Structs§

Inputs
2026-09-28: Everything compile reads besides the plan.

Functions§

compile
2026-09-28: Compile plan with its buffers placed by buffers at workspace.
layout
2026-09-28: The storage constraints of plan.