Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/accuracy-regression-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ jobs:
OLD_VENV="${OLD_ROOT}/.venv"
python -m venv "${OLD_VENV}"
"${OLD_VENV}/bin/python" -m pip install --upgrade pip
# Split-era revisions need the payload-bearing Maturin core installed
# first. Newer revisions keep this path only as a compatibility
# metapackage, which must not be installed ahead of the root package.
# Split-era revisions need the historical payload-bearing Maturin core
# installed first. Current revisions have no separate Python core
# project, but regression tests still need to install old baselines.
if grep -q 'build-backend = "maturin"' "${OLD_ROOT}/src/aiconfigurator-core/pyproject.toml" 2>/dev/null; then
"${OLD_VENV}/bin/python" -m pip install -e "${OLD_ROOT}/src/aiconfigurator-core"
fi
Expand Down
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,8 @@ pip3 install aiconfigurator
```

The `aiconfigurator` wheel is self-contained: it includes the CLI, SDK, model
and system data, Spica, and the native core extension. The
`aiconfigurator-core` distribution remains available as a payload-free
compatibility package that installs the matching `aiconfigurator` version.
and system data, Spica, and the native core extension. No separate Python core
distribution is required.

### Build and Install from Source

Expand All @@ -66,7 +65,7 @@ pip3 install .
### Build with Docker

```bash
# This creates the self-contained AIC wheel and a compatibility metapackage wheel
# This creates the self-contained AIC wheel
docker build -f docker/Dockerfile --no-cache --target build -t aiconfigurator:latest .
docker create --name aic aiconfigurator:latest && docker cp aic:/workspace/dist dist/ && docker rm aic
```
Expand Down
12 changes: 5 additions & 7 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,9 @@ ENV MPLCONFIGDIR=/tmp/matplotlib

FROM base AS build
# The `aiconfigurator` wheel owns the Rust extension, SDK/data payload, CLI,
# generator, webapp, and Spica packages. The small `aiconfigurator-core` wheel
# built afterward is only a compatibility metapackage. Maturin needs the Rust
# crate sources, a C linker (gcc), and ca-certificates so cargo can fetch crates
# from crates.io over TLS. Rust itself is bootstrapped by maturin's build backend.
# generator, webapp, and Spica packages. Maturin needs the Rust crate sources,
# a C linker (gcc), and ca-certificates so cargo can fetch crates from crates.io
# over TLS. Rust itself is bootstrapped by maturin's build backend.
RUN apt-get update && \
apt-get install -y --no-install-recommends ca-certificates gcc libc6-dev && \
rm -rf /var/lib/apt/lists/*
Expand All @@ -39,12 +38,11 @@ RUN set -e; \
exit 1; \
fi
RUN uv build --wheel --out-dir /workspace/dist && \
cd src/aiconfigurator-core && uv build --wheel --out-dir /workspace/dist && \
cd /workspace && python tools/verify_release_wheels.py /workspace/dist
python tools/verify_release_wheels.py /workspace/dist

FROM base AS runtime
COPY --from=build /workspace/dist /wheelhouse
RUN uv pip install /wheelhouse/*.whl && \
RUN uv pip install /wheelhouse/aiconfigurator-*.whl && \
rm -rf /wheelhouse

FROM runtime AS test
Expand Down
31 changes: 16 additions & 15 deletions docs/universe/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ <h1><b>AIConfigurator</b> Universe</h1>
{name:'Sweepers · Orchestration', color:'#4cc9f0'},
{name:'Search Space', color:'#818cf8'},
{name:'Deployment Simulation · Dynamo + AIC', color:'#38bdf8'},
{name:'AIC Core · Python Wheel + Rust Crate', color:'#c77dff'},
{name:'AIC Core · AIC Wheel + Rust Crate', color:'#c77dff'},
{name:'Perf Model Variants · 4 Op Modes / Layerwise / FPM / FPM-tuned', color:'#ff9e64'},
{name:'Op Collector Solution · Model / Operations / PerfDatabase', color:'#2dd4bf'},
{name:'Op Data Points', color:'#14b8a6'},
Expand Down Expand Up @@ -435,11 +435,11 @@ <h1><b>AIConfigurator</b> Universe</h1>
desc:'AIC’s <b>per-forward-pass timing model</b>. Mocker supplies the exact scheduled workload: mixed prefill+decode fields for an aggregated pass, prefill-only fields for a prefill worker, or decode-only fields for a decode worker. It predicts duration from the AIC modeling core and measured perf data; it does <b>not</b> own queues, routing, replica pools, KV allocation, or P→D handoff.',
sym:['<code>EnginePerfModel</code> → <code>ForwardPassPerfModel</code>','<code>estimate_forward_pass_time()</code>','mixed · prefill · decode FPM workload kinds','native AIC model with regression fallback']}},

// ---- L4 AIC Core · two distribution surfaces over one native implementation ----
{id:'core_wheel', l:4, repo:'aic', label:'aiconfigurator-core · Python Wheel', sub:'EngineConfig · ForwardPassMetrics · RustForwardPassPerfModel estimator',
det:{file:['src/aiconfigurator-core/pyproject.toml','src/aiconfigurator_core/__init__.py','rust/aiconfigurator-core/src/py.rs'],
desc:'The Maturin-built <b>Python distribution surface</b> over the same Rust core. Python imports <code>aiconfigurator_core</code>, supplies <code>EngineConfig</code> and per-iteration <code>ForwardPassMetrics</code>, then calls <code>RustForwardPassPerfModel</code> for forward-pass latency. It exposes the four op-based database modes (SILICON, HYBRID, EMPIRICAL, SOL), pure-FPM regression, and FPM-calibrated native strategy; the layerwise strategy below is planned. The wheel also bundles the Python SDK, system data, and model configs.',
sym:['distribution <code>aiconfigurator-core</code> · import <code>aiconfigurator_core</code>','<code>AicEngine</code>','<code>RustForwardPassPerfModel</code>','Maturin abi3 wheel']}},
// ---- L4 AIC Core · Python and Rust surfaces over one native implementation ----
{id:'aic_wheel', l:4, repo:'aic', label:'aiconfigurator · Python Wheel', sub:'EngineConfig · ForwardPassMetrics · RustForwardPassPerfModel estimator',
det:{file:['aiconfigurator-main: pyproject.toml','aiconfigurator-main: src/aiconfigurator_core/__init__.py','aiconfigurator-main: rust/aiconfigurator-core/src/py.rs'],
desc:'The self-contained Maturin-built <b>Python distribution</b>. It bundles the CLI, SDK, system data, model configs, Spica, and the compiled <code>aiconfigurator_core</code> extension. Python supplies <code>EngineConfig</code> and per-iteration <code>ForwardPassMetrics</code>, then calls <code>RustForwardPassPerfModel</code> for forward-pass latency. The four op-based database modes (SILICON, HYBRID, EMPIRICAL, SOL), pure-FPM regression, and FPM-calibrated native strategy are available through this single wheel; the layerwise strategy below is planned.',
sym:['distribution <code>aiconfigurator</code> · import <code>aiconfigurator_core</code>','<code>AicEngine</code>','<code>RustForwardPassPerfModel</code>','Maturin abi3 wheel']}},

{id:'core_crate', l:4, repo:'aic', label:'aiconfigurator-core · Rust Crate', sub:'EngineConfig · ForwardPassMetrics · ForwardPassPerfModel estimator',
det:{file:['rust/aiconfigurator-core/Cargo.toml','rust/aiconfigurator-core/src/lib.rs','rust/aiconfigurator-core/src/config.rs','rust/aiconfigurator-core/src/fpm/metrics.rs','rust/aiconfigurator-core/src/fpm/model.rs'],
Expand Down Expand Up @@ -584,10 +584,10 @@ <h1><b>AIConfigurator</b> Universe</h1>
// L3 composition — Replay calls the component models and AIC timing oracle.
['m_sched','m_estlat'],
['m_sched','m_router','alt'],['m_sched','m_planner','alt'],['m_sched','m_kvbm','alt'],
// AIC ForwardPassPerfModel → both aiconfigurator-core distribution surfaces.
['m_estlat','core_wheel'],['m_estlat','core_crate'],
// AIC ForwardPassPerfModel → Python wheel and Rust crate surfaces.
['m_estlat','aic_wheel'],['m_estlat','core_crate'],
// The Python wheel is built from the Rust crate; group-level links expose both L5 families.
['core_wheel','core_crate','bridge'],
['aic_wheel','core_crate','bridge'],
['core_crate','pm_ops'], // Rust engine-step op path is SILICON-only today.
// All four op modes share the L6 op graph; mode-specific behavior resolves in PerfDatabase.
['pm_ops','op_model'],['pm_ops','op_operations'],['pm_ops','op_perfdb'],
Expand All @@ -612,8 +612,8 @@ <h1><b>AIConfigurator</b> Universe</h1>
['profiler','space_dyn'],
['profiler','space_sched'],
['profiler','space_engine'],
['core_wheel','models_op'],
['core_wheel','models_fpm'],
['aic_wheel','models_op'],
['aic_wheel','models_fpm'],
['core_crate','models_fpm'],
];

Expand All @@ -633,9 +633,9 @@ <h1><b>AIConfigurator</b> Universe</h1>
['Deployment simulation · Mocker Replay (agg + disagg)', 'm_sched'],
['Planner · KV Router · KVBM / KV Transfer', 'm_planner','m_router','m_kvbm'],
['AIC ForwardPassPerfModel · per-pass timing', 'm_estlat'],
['aiconfigurator-core Python wheel', 'core_wheel'],
['aiconfigurator Python wheel', 'aic_wheel'],
['aiconfigurator-core Rust crate', 'core_crate'],
['EngineConfig · ForwardPassMetrics · ForwardPassPerfModel', 'core_wheel','core_crate'],
['EngineConfig · ForwardPassMetrics · ForwardPassPerfModel', 'aic_wheel','core_crate'],
['7 L5 variants · 4 op modes · layerwise · pure FPM · FPM-tuned', 'pm_ops','pm_op_hybrid','pm_op_empirical','pm_op_sol','pm_layerwise','pm_fpm','pm_fpm_tuned'],
['Op model internals · Model → Operations → PerfDatabase', 'op_model','op_operations','op_perfdb'],
['Op data → collectors → GPUs / LLMs / frameworks / versions', 'op_data_points','op_collectors','collect_gpus','collect_llms','collect_frameworks','collect_versions'],
Expand Down Expand Up @@ -780,7 +780,7 @@ <h1><b>AIConfigurator</b> Universe</h1>
],

// L4–L7 · AIC core and performance-model data
core_wheel: [
aic_wheel: [
'Expose the planned layerwise strategy through <code>aiconfigurator_core</code> once its estimator is stable.',
],
core_crate: [
Expand Down Expand Up @@ -1238,6 +1238,7 @@ <h1><b>AIConfigurator</b> Universe</h1>
const detail=document.getElementById('detail'), dhead=document.getElementById('dhead'), dbody=document.getElementById('dbody');
const SOURCE_REPOS={
aiconfigurator:{base:'https://github.com/ai-dynamo/aiconfigurator',ref:'ad0e3e5e31ee3b8ebcc69617f51b1bd5cfdd659a'},
'aiconfigurator-main':{base:'https://github.com/ai-dynamo/aiconfigurator',ref:'main'},
dynamo:{base:'https://github.com/ai-dynamo/dynamo',ref:'ec45adf2a3f7b719fcba5d5c7c2cf32747b4e030'},
};
function encodeSourcePath(path){ return path.split('/').filter(Boolean).map(encodeURIComponent).join('/'); }
Expand Down Expand Up @@ -1324,7 +1325,7 @@ <h3>L1 orchestration · 4 components</h3>
<h3>The rest of the spine</h3>
<ul>
<li><b>Deployment simulation</b> — Dynamo Mocker Replay owns <code>AggRuntime</code>/<code>DisaggRuntime</code> and scheduler behavior; Planner, KV Router, and KVBM contribute their component decisions; AIC’s <code>ForwardPassPerfModel</code> times each scheduled pass.</li>
<li><b>AIC core</b> has two package surfaces over one native implementation: the <code>aiconfigurator-core</code> <b>Python wheel</b> and <b>Rust crate</b>, centered on <code>EngineConfig</code>, <code>ForwardPassMetrics</code>, and the <code>ForwardPassPerfModel</code> estimator.</li>
<li><b>AIC core</b> has two runtime surfaces over one native implementation: the self-contained <code>aiconfigurator</code> <b>Python wheel</b> and the <code>aiconfigurator-core</code> <b>Rust crate</b>, centered on <code>EngineConfig</code>, <code>ForwardPassMetrics</code>, and the <code>ForwardPassPerfModel</code> estimator. There is no standalone <code>aiconfigurator-core</code> Python distribution.</li>
<li><b>Seven L5 variants</b> — four op-based database modes (<b>SILICON</b>, <b>HYBRID</b>, <b>EMPIRICAL</b>, <b>SOL</b>), the planned <b>layerwise-collector</b> model, the <b>pure FPM-data</b> regression, and the <b>native model fine-tuned with FPM calibration</b>.</li>
<li><b>Op-mode drill-down</b> — all four op modes share <b>Model → Operations → PerfDatabase</b>; the database mode selects silicon-first, silicon-with-formula-fallback, formula-only empirical/SOL, or theoretical SOL latency. The stack continues through <b>Op Data Points → Op Collectors</b>, parameterized by GPUs, LLMs, frameworks, and framework versions.</li>
<li><b>Infrastructure (L10)</b> — Auto Op Collector, Support Matrix Healer, Auto Gap Analysis, Auto Gap Mitigation, and the planned Auto FPM Collector automate coverage and fidelity loops.</li>
Expand Down
23 changes: 0 additions & 23 deletions src/aiconfigurator-core/pyproject.toml

This file was deleted.

4 changes: 2 additions & 2 deletions src/aiconfigurator/sdk/config_builders.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

"""Shared ModelConfig construction helpers.

These helpers are used by both the upper CLI layer and lower modeling/engine
paths. Keeping them in ``sdk`` prevents the core wheel from importing CLI code.
These helpers are used by both the CLI layer and lower modeling/engine paths.
Keeping them in ``sdk`` prevents lower-level code from importing CLI code.
"""

from __future__ import annotations
Expand Down
37 changes: 10 additions & 27 deletions tools/verify_release_wheels.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

"""Verify that release wheels have one owner for the complete AIC payload."""
"""Verify the self-contained AIC release wheel."""

from __future__ import annotations

Expand Down Expand Up @@ -47,7 +47,7 @@ def _source_payload() -> set[str]:
return expected


def _verify_main_wheel(wheel: Path) -> str:
def _verify_main_wheel(wheel: Path) -> None:
names, metadata = _wheel_files(wheel)
required = {
"aiconfigurator/cli/main.py",
Expand Down Expand Up @@ -82,29 +82,10 @@ def _verify_main_wheel(wheel: Path) -> str:

requirements = metadata.get_all("Requires-Dist", [])
if any(requirement.lower().startswith("aiconfigurator-core") for requirement in requirements):
raise RuntimeError(f"{wheel.name}: must not depend on the compatibility metapackage")
raise RuntimeError(f"{wheel.name}: must not depend on the removed aiconfigurator-core distribution")

version = metadata.get("Version")
if not version:
if not metadata.get("Version"):
raise RuntimeError(f"{wheel.name}: missing distribution version")
return version


def _verify_core_metapackage(wheel: Path, aic_version: str) -> None:
names, metadata = _wheel_files(wheel)
payload = sorted(name for name in names if ".dist-info/" not in name)
if payload:
raise RuntimeError(f"{wheel.name}: compatibility wheel must not own payload files: {payload}")

if metadata.get("Version") != aic_version:
raise RuntimeError(
f"{wheel.name}: version {metadata.get('Version')!r} does not match aiconfigurator {aic_version!r}"
)

requirements = metadata.get_all("Requires-Dist", [])
expected = f"aiconfigurator=={aic_version}"
if expected not in requirements:
raise RuntimeError(f"{wheel.name}: expected Requires-Dist {expected!r}, found {requirements}")


def main() -> int:
Expand All @@ -113,10 +94,12 @@ def main() -> int:
args = parser.parse_args()

main_wheel = _one_wheel(args.dist_dir, "aiconfigurator-*.whl")
core_wheel = _one_wheel(args.dist_dir, "aiconfigurator_core-*.whl")
aic_version = _verify_main_wheel(main_wheel)
_verify_core_metapackage(core_wheel, aic_version)
print(f"Verified self-contained {main_wheel.name} and payload-free {core_wheel.name}")
removed_core_wheels = sorted(args.dist_dir.glob("aiconfigurator_core-*.whl"))
if removed_core_wheels:
raise RuntimeError(f"unexpected aiconfigurator-core wheel: {[path.name for path in removed_core_wheels]}")

_verify_main_wheel(main_wheel)
print(f"Verified self-contained {main_wheel.name}")
return 0


Expand Down
Loading