Expand description
EngineSpec: the serializable engine wire format.
EngineSpec is what Python’s compile_engine emits and what the
Rust Engine consumes. It bundles the engine identity
(EngineConfig, needed later to load the matching PerfDatabase) with
the precompiled context / generation op lists. Each op is an
OpSpec — a public alias for the crate’s [Op] enum — and the lists
round-trip through bincode, including the recursive Overlap / Fallback
children.
§Vision is never on the wire
[Op::Vision] derives serde with every other variant (it remains part of
the shared session path), but a compiled EngineSpec never
contains a Vision op: compile_engine decomposes the vision encoder
into its child Gemm / EncoderAttention / Elementwise ops, each an
existing variant. The type round-trips soundly (see the test below); the
constraint is purely a producer-side rule, not enforced by the enum.
Structs§
- Engine
Spec - Serializable compiled engine.
Enums§
- OpSpec
- Public name for the serializable op. Aliases the crate’s [
Op] enum so the “OpSpec” surface exists without duplicating the definition. Typed operator. One variant per Pythonoperationsfamily.