Expand description
2026-09-25: The scheduler’s I/O contract (SBIO).
The core (in the server crate) hands device work to a DeviceIo as
StepPlans and Effects, and can reach the model itself through
DeviceIo::model. The clock is a ClockIo, swap files a SpillIo.
driver::run is the scheduler loop.
ScriptedDeviceIo wraps a router and answers the decode lane from a
script, so a test can drive the real core with chosen tokens.
TracingDeviceIo wraps a router and logs each call.
Owner: scheduler. Invariants:
- The sequence state, the device logits handle and the model are type parameters, never a concrete model type, anywhere in this crate.
Re-exports§
pub use clock::ClockIo;pub use clock::SystemClock;pub use device::DeviceIo;pub use driver::Core;pub use driver::LaneVerdict;pub use driver::TickPlan;pub use driver::run;pub use effect::Effect;pub use effect::EffectOutcome;pub use plan::DecodeCtxCommit;pub use plan::DecodeRows;pub use plan::FeedSource;pub use plan::Label;pub use plan::Readback;pub use plan::RowMask;pub use plan::StepOutcome;pub use plan::StepPlan;pub use plan::StepResult;pub use scripted::Fault;pub use scripted::ScriptedDeviceIo;pub use spill::SpillIo;pub use trace_device::TraceSink;pub use trace_device::TracingDeviceIo;pub use types::DeviceError;pub use types::DeviceFacts;pub use types::Ticket;pub use types::WaitPolicy;
Modules§
- clock
- 2026-09-25:
ClockIo, the injectable clock, andSystemClock, its implementation overInstant::now. - device
- 2026-09-25:
DeviceIo, the model-facing router: the core launchesStepPlans and appliesEffects, and the router decides how they reach the device. - driver
- 2026-09-25: The scheduler loop. A
Coreplans a tick, executes its lanes and ends it;runonly sequences those calls and never touches a device. - effect
- 2026-09-25:
Effect, the device-side bookkeeping the core asks a router for between steps, andEffectOutcome, the router’s answer. Generic over the sequence stateSand the logits handleP. - plan
- 2026-09-25: What the core asks the device to run (
StepPlan) and what comes back (StepResult). Generic over the device’s logits handleP. - scripted
- 2026-09-25:
ScriptedDeviceIo, a test router wrapped around an inner router. It answers the decode lane’s readback from a script (per sequence, in order), fails a launch on cue, reports a configurable depth, and records every effect and LoRA command, while the inner router still performs the device bookkeeping the rows need. - spill
- 2026-09-25:
SpillIo, the swap files a sequence is spilled to when the KV pool runs dry. The router owns the files, their ids and the usage ledger. - trace_
device - 2026-09-25:
TracingDeviceIo, a decorator that writes one line per launch, effect, LoRA command and teardown into a sink, then forwards the call to the innerDeviceIo. - types
- 2026-09-25: Small value types shared by the routers.