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
5 changes: 3 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ keywords = ["llm", "genai", "inference", "nvidia", "distributed"]

[workspace.dependencies]
# Published separately by https://github.com/ai-dynamo/aisimulate.
aisimulate-core = { version = "=0.1.0-dev.2" }
aisimulate-core = { version = "=0.12.0-dev.1" }

# Local crates
dynamo-runtime = { path = "lib/runtime", version = "1.5.0" }
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/mocker/bench_aic_concurrency.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
MODEL = "Qwen/Qwen3-32B"
SYSTEM = "h200_sxm"
BACKEND = "vllm"
BACKEND_VERSION = "0.19.0"
BACKEND_VERSION = "current"

BS, ISL = 16, 2048
THREAD_COUNTS = (1, 2, 4, 8, 12, 16, 24)
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/mocker/bench_aic_rust_callback.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
MODEL = "Qwen/Qwen3-32B"
SYSTEM = "h200_sxm"
BACKEND = "vllm"
BACKEND_VERSION = "0.19.0"
BACKEND_VERSION = "current"

# Workloads chosen to stress the predict hot path differently. ``num_workers`` > 1
# is where the Python GIL serialises predictions, so the Rust win is largest there.
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ classifiers = [
]

dependencies = [
"aisimulate==0.1.0.dev2; python_version >= '3.11' and python_version < '3.14'",
"aisimulate==0.12.0.dev1; python_version >= '3.11' and python_version < '3.14'",
"aiperf==0.12.0",
"matplotlib",
"networkx",
Expand Down
5 changes: 3 additions & 2 deletions components/src/dynamo/mocker/args.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,8 +344,9 @@ def parse_args(argv: list[str] | None = None) -> argparse.Namespace:
"--aic-backend-version",
type=str,
default=None,
help="AIC backend engine version (e.g., '0.19.0' for vLLM, '0.5.10' for SGLang, "
"'1.3.0rc10' for TRT-LLM). If not set, uses the default version for the backend.",
help="AIC performance-database version: 'current', 'previous', or 'next' "
"when available, or a version assigned to one of those slots. "
"Defaults to the release database's 'current' slot.",
)
parser.add_argument(
"--aic-tp-size",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def _config() -> PlannerConfig:
hf_id="Qwen/Qwen3-32B",
system="h200_sxm",
backend="vllm",
backend_version="0.19.0",
backend_version="current",
prefill_pick=pick,
decode_pick=pick,
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def test_rapid_task_v2_build_and_execute_contract() -> None:
total_gpus=2,
system="h200_sxm",
backend="vllm",
backend_version="0.19.0",
backend_version="current",
isl=128,
osl=8,
ttft=100_000.0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -313,21 +313,21 @@ def test_injects_all_required_flags(self):
assert out[out.index("--aic-attention-dp-size") + 1] == "8"
# trtllm is not a mocker engine_type; leave --engine-type alone.
assert "--engine-type" not in out
assert out[out.index("--aic-backend-version") + 1] == "1.3.0rc10"
assert out[out.index("--aic-backend-version") + 1] == "current"

def test_matches_engine_type_for_vllm(self):
spec = self._spec("vllm")
out = _inject_mocker_aic_args([], spec, spec.prefill_pick)
assert out[out.index("--engine-type") + 1] == "vllm"
assert out[out.index("--aic-backend") + 1] == "vllm"
assert out[out.index("--aic-backend-version") + 1] == "0.14.0"
assert out[out.index("--aic-backend-version") + 1] == "current"

def test_matches_engine_type_for_sglang(self):
spec = self._spec("sglang")
out = _inject_mocker_aic_args([], spec, spec.decode_pick)
assert out[out.index("--engine-type") + 1] == "sglang"
assert out[out.index("--aic-backend") + 1] == "sglang"
assert out[out.index("--aic-backend-version") + 1] == "0.5.6.post2"
assert out[out.index("--aic-backend-version") + 1] == "current"


class TestBuildPlannerConfigEmbedsAicSpec:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
AIC_PARITY_MODEL = "Qwen/Qwen3-32B"
AIC_PARITY_SYSTEM = "h200_sxm"
AIC_PARITY_VERSIONS = {
"vllm": "0.19.0",
"sglang": "0.5.6.post2",
"vllm": "current",
"sglang": "current",
Comment thread
tedzhouhk marked this conversation as resolved.
}
AIC_PARITY_BACKENDS = [
pytest.param("vllm", id="vllm"),
Expand Down
9 changes: 3 additions & 6 deletions components/src/dynamo/profiler/utils/dgd_generation.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
import numpy as np
import yaml

from dynamo._internal.aic import (
DEFAULT_BACKEND_VERSIONS as _MOCKER_AIC_BACKEND_VERSIONS,
)
from dynamo.common.utils.paths import get_workspace_dir
from dynamo.planner.config.aic_interpolation_spec import AICInterpolationSpec
from dynamo.planner.config.backend_components import MockerComponentName
Expand Down Expand Up @@ -54,15 +57,9 @@
needs_mocker_aic_perf_model,
needs_profile_data,
)
from dynamo.profiler.utils.replay_optimize.constants import AIC_BACKEND_VERSIONS

logger = logging.getLogger(__name__)

_MOCKER_AIC_BACKEND_VERSIONS = {
**AIC_BACKEND_VERSIONS,
"trtllm": "1.3.0rc10",
}


def _load_latest_database_version() -> Optional[Callable[..., Optional[str]]]:
try:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@

import os

from dynamo._internal.aic import DEFAULT_BACKEND_VERSIONS

AIC_BACKEND_VERSIONS = {
"vllm": "0.14.0",
"sglang": "0.5.6.post2",
backend: DEFAULT_BACKEND_VERSIONS[backend] for backend in ("vllm", "sglang")
}

DEFAULT_OVERLAP_SCORE_CREDITS = (1.0,)
Expand Down
8 changes: 8 additions & 0 deletions components/src/dynamo/replay/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

from aisimulate.aic import materialize_aic_num_gpu_blocks

from dynamo._internal.aic import resolve_backend_version
from dynamo.mocker import MockEngineArgs
from dynamo.mocker.args import (
resolve_planner_profile_data as _resolve_mocker_planner_profile_data,
Expand All @@ -26,6 +27,13 @@ class PlannerProfileDataResult(Protocol):
def resolve_aic_num_gpu_blocks(raw: dict[str, Any]) -> None:
"""Materialize AIC KV capacity in-place for SDK compatibility."""

if (
raw.get("aic_backend") is not None
or raw.get("aic_attention_dp_size") is not None
):
raw["aic_backend_version"] = resolve_backend_version(
raw.get("aic_backend") or "vllm", raw.get("aic_backend_version")
)
lowered = materialize_aic_num_gpu_blocks(raw)
raw.clear()
raw.update(lowered)
Expand Down
4 changes: 2 additions & 2 deletions components/src/dynamo/replay/simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
from numbers import Real
from typing import Any

from aisimulate.aic import materialize_aic_num_gpu_blocks
from aisimulate.sweeper.provider import JSONValue, RuntimeHookSpec
from aisimulate.sweeper.replay import (
HookCapability,
Expand All @@ -30,6 +29,7 @@
from dynamo.llm import AicPerfConfig, KvRouterConfig
from dynamo.mocker import MockEngineArgs
from dynamo.replay.api import run_synthetic_trace_replay, run_trace_replay
from dynamo.replay.config import resolve_aic_num_gpu_blocks

_PLANNER_HOOK = HookCapability(
provider="dynamo.planner",
Expand Down Expand Up @@ -260,7 +260,7 @@ def _engine_args(payload: dict[str, JSONValue] | None) -> MockEngineArgs:
"aic_model_path",
):
lowered.pop(name, None)
lowered = materialize_aic_num_gpu_blocks(lowered)
resolve_aic_num_gpu_blocks(lowered)
# Pipeline parallelism is already represented in the public parallel
# mapping and used for AIC capacity. MockEngineArgs has no PP field.
lowered.pop("aic_pp_size", None)
Expand Down
2 changes: 1 addition & 1 deletion components/src/dynamo/replay/tests/test_simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ def test_fixed_timing_keeps_aic_identity_out_of_runtime_args(monkeypatch) -> Non
monkeypatch.setattr(simulation, "MockEngineArgs", _FakeEngineArgs)
monkeypatch.setattr(
simulation,
"materialize_aic_num_gpu_blocks",
"resolve_aic_num_gpu_blocks",
lambda payload: payload,
)
engine_args = simulation.DynamoReplayRunner._engine_args(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ def test_sweeper_runs_real_dynamo_replay_in_spawned_workers() -> None:
include_router=True,
)

candidates = Sweeper(
result = Sweeper(
runner_factory=DynamoReplayRunnerFactory(),
providers={
"dynamo.planner": create_planner_provider(),
Expand All @@ -245,7 +245,9 @@ def test_sweeper_runs_real_dynamo_replay_in_spawned_workers() -> None:
show_progress=False,
).run(config)

candidates = result.candidates
assert len(candidates) == 2
assert all(candidate.status == "feasible" for candidate in candidates)
assert all(
candidate.metrics["output_throughput_tok_s"] > 0.0 for candidate in candidates
)
Expand Down
2 changes: 1 addition & 1 deletion container/deps/requirements.aisimulate.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
# SPDX-License-Identifier: Apache-2.0

# Published AISimulate wheel staged into planner and framework runtime wheelhouses.
aisimulate==0.1.0.dev2
aisimulate==0.12.0.dev1
12 changes: 12 additions & 0 deletions container/templates/wheel_builder.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -639,10 +639,22 @@ COPY container/deps/requirements.aisimulate.txt /opt/dynamo/container/deps/requi
# wheel consumed by ai-dynamo instead of rebuilding it from vendored source.
# Download only this distribution; runtime images own dependency installation
# through their requirements files and local wheels.
# AISimulate targets glibc 2.34+, which all consuming runtime images support.
# Select that target explicitly: the manylinux_2_28 builder only stages the
# wheel and must not filter it using the builder's older glibc version.
RUN --mount=type=cache,id=uv-root-{{ context.dynamo.uv_version }},target=/root/.cache/uv,sharing=shared \
export UV_CACHE_DIR=/root/.cache/uv && \
source ${VIRTUAL_ENV}/bin/activate && \
case "${TARGETARCH}" in \
amd64) AISIMULATE_WHEEL_ARCH=x86_64 ;; \
arm64) AISIMULATE_WHEEL_ARCH=aarch64 ;; \
*) echo "Unsupported AISimulate target architecture: ${TARGETARCH}" >&2; exit 1 ;; \
esac && \
python -m pip download \
--platform "manylinux_2_34_${AISIMULATE_WHEEL_ARCH}" \
--python-version "${PYTHON_VERSION}" \
Comment thread
tedzhouhk marked this conversation as resolved.
--implementation cp \
--abi abi3 \
--only-binary=:all: \
--no-deps \
--dest /opt/dynamo/dist \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,9 @@ For the timing-model design, see [Mocker Engine Architecture](../../developer-gu
</ParamField>

<ParamField path="--aic-backend-version" type="string" default="auto">
AIC backend engine version, for example `0.12.0` for vLLM. When unset, uses the default version for
the backend.
AIC performance-database version. Use `current`, `previous`, or `next` when the slot is available
for the selected system and backend, or specify a version assigned to one of those slots.
When unset, uses the release database's `current` slot.
</ParamField>

<ParamField path="--aic-tp-size" type="integer" default="1">
Expand Down
5 changes: 3 additions & 2 deletions lib/bindings/kvbm/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions lib/bindings/python/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/bindings/python/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ request-trace-s3 = ["dynamo-llm/request-trace-s3"]
# former AIC crate surface. The `python` feature is required for
# AicEngineBuilder; this extension supplies the interpreter, so the dependency
# must not enable `extension-module`.
aisimulate-core = { version = "=0.1.0-dev.2", optional = true, features = ["python"] }
aisimulate-core = { version = "=0.12.0-dev.1", optional = true, features = ["python"] }
dynamo-runtime = { path = "../../runtime" }
dynamo-mocker = { path = "../../mocker" }
dynamo-parsers = { version = "8.1.0" }
Expand Down
10 changes: 5 additions & 5 deletions lib/bindings/python/src/dynamo/_internal/aic.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
# Dynamo's historical default when conditional acceptance rates are omitted.
_DEFAULT_NEXTN_ACCEPT_RATES = [0.85, 0.3, 0.0, 0.0, 0.0]

# Default backend versions match the AIC-core v0.11.0 perf DB.
# Resolve defaults through the queryable slots in the pinned AISimulate perf DB.
DEFAULT_BACKEND_VERSIONS = {
"vllm": "0.19.0",
"sglang": "0.5.10",
"trtllm": "1.3.0rc10",
"vllm": "current",
"sglang": "current",
"trtllm": "current",
Comment thread
tedzhouhk marked this conversation as resolved.
}
_KV_CAPACITY_BACKENDS = frozenset(DEFAULT_BACKEND_VERSIONS)
DEFAULT_STATIC_STRIDE = 32
Expand All @@ -39,7 +39,7 @@ def _validate_kv_capacity_backend(backend_name: str) -> None:


def resolve_backend_version(backend_name: str, backend_version: str | None) -> str:
"""Return the pinned backend version used for AIC perf lookups."""
"""Preserve explicit versions; otherwise use the release database current slot."""
Comment thread
tedzhouhk marked this conversation as resolved.
if backend_version is not None:
return backend_version
return DEFAULT_BACKEND_VERSIONS.get(backend_name, DEFAULT_BACKEND_VERSIONS["vllm"])
Expand Down
Loading
Loading