Expand description
Rust-native core latency API for AIConfigurator.
The compiled-engine path is the only supported entry point: Python’s
compile_engine walks the model once and emits an engine::spec::EngineSpec
(op lists + EngineConfig identity); the Rust engine::Engine executes
it without re-entering Python. AicEngineBuilder is the preferred Rust →
Python → Rust embedded build entry point. AicEngine is the PyO3 hot-path
pyclass.
Re-exports§
pub use memory::estimate_kv_cache;pub use memory::EstimateSource;pub use memory::KvCacheEstimate;pub use memory::KvCacheEstimateAdjusted;pub use memory::KvCacheEstimateError;pub use memory::KvCacheEstimateOptions;pub use memory::KvCacheEstimateRequest;pub use memory::KvCacheMemoryFraction;pub use memory::MemoryBreakdown;
Modules§
Structs§
- AicEngine
- PyO3 wrapper around the
Engine: a compiled engine the Python sweep / Mocker bridge drives per point. - AicEngine
Builder - Ergonomic builder for the Rust -> Python -> Rust compiled-engine entry point.
- Engine
Config - Static engine identity and setup information carried by an
crate::engine::spec::EngineSpec. - Forward
Pass Metrics - Per-iteration forward-pass metrics.
- Forward
Pass Perf Diagnostics - Current readiness and tuning state for a
ForwardPassPerfModel. - Forward
Pass Perf Model - Forward-pass-level performance model with optional online tuning.
- Forward
Pass Perf Options - In-memory tuning controls for
ForwardPassPerfModel. - Parallel
Mapping - Parallelism layout. Flattened into
EngineConfigso the flat wire keys (tp_size,pp_size, …) parse unchanged. - Quantization
Config - Precision/quantization dtypes. Flattened into
EngineConfig. Field names and types are unchanged from the former flat struct so the flat wire keys (weight_dtype,moe_dtype, …) parse unchanged. - Queued
Request Metrics - Metrics for requests queued but not scheduled in one iteration.
- Scheduled
Request Metrics - Metrics for requests scheduled in one forward-pass iteration.
- Speculative
Config - Multi-Token Prediction speculative-decoding parameters. Wrapped in
Option<>onEngineConfigso models without MTP don’t carry the noise, and#[serde(flatten)]-ed so the flat wire key (nextn) parses unchanged. Accepted-token progress is modeled aboveaic-core.
Enums§
- AicError
- All errors surfaced by the Rust core.
- Backend
Kind - Backend performance database family.
- Data
Type - Precision/quantization dtypes carried on the engine-config wire.
- Forward
Pass Perf Readiness - Readiness state reported by
ForwardPassPerfDiagnostics. - Forward
Pass Perf Source - Prediction backend currently used by
ForwardPassPerfModel.
Constants§
- ENGINE_
CONFIG_ SCHEMA_ VERSION - ENGINE_
SPEC_ SCHEMA_ VERSION - FPM_
VERSION - Wire-schema version for
ForwardPassMetrics(Dynamo’s scheduler telemetry). The FPM input is rejected withAicError::UnsupportedSchemaVersionwhenversiondoes not match.