1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
// SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
// SPDX-License-Identifier: Apache-2.0
//! Rust-native AIConfigurator performance-model implementation.
//!
//! 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. With the `python` feature enabled,
//! [`AicEngineBuilder`] is the preferred Rust → Python → Rust embedded build
//! entry point and [`AicEngine`] is the PyO3 hot-path pyclass.
//!
//! This directory remains a stable mirror of the former AIConfigurator Rust
//! crate. Keeping the imported implementation behind one namespace makes
//! upstream syncs mechanical while the crate root remains owned by replay.
use PathBuf;
pub
pub
// Modular core. `common/` holds shared foundation types (enums, error,
// system_spec) with no AIC-domain knowledge. Top-level files (`config`,
// `session`) and directories (`operators`, `perf_database`) carry the domain
// logic the compiled `engine` executes.
pub
pub
pub
pub
pub
pub
pub use AicError;
// Forward-pass perf model (PR #1152): a forward-pass latency model with online
// correction, regression fallback, diagnostics, and readiness, built on the
// compiled [`engine::Engine`]. Re-exported so Rust embedders (the Dynamo
// planner / Mocker) can use it natively; also exposed to Python via the
// `RustForwardPassPerfModel` pyclass in `py.rs`.
pub use ;
// Forward-pass metrics telemetry types and schema version, plus the
// crate-internal validation helper. Re-exported at the crate root so existing
// `crate::ForwardPassMetrics` / `crate::FPM_VERSION` references (in `py.rs`,
// `engine/runtime.rs`) keep resolving after the types moved into `fpm`.
pub use validate_forward_pass_metrics;
pub use ;
// KV-cache memory API. Top-level surface, not a method on
// `AicEngine`: estimation runs once at startup, separate from the latency path.
pub use estimate_kv_cache;
pub use ;
// PyO3 bindings. `AicEngine` is the Python -> Rust hot-path pyclass;
// `AicEngineBuilder` is the Rust -> Python -> Rust entry point. They must be
// `pub`-re-exported here because the `py` module itself is private.
pub use ;
// Public wire/identity config types live in `config`. Re-exported at the crate
// root so existing `crate::EngineConfig` / `crate::BackendKind` / ... paths
// resolve unchanged across the crate and for external consumers.
pub use ;
/// Resolve a repo-relative path by walking up from the crate manifest dir.
/// Used by [`py`] to locate the bundled data roots when developing in-tree.
pub
/// Register the compatibility AIConfigurator API on the unified native
/// `aisimulate._runtime` extension module.