[Edge][WP2] Finalize edge profile init knobs from init_profile; WP4 CPU emulation results
init_profile 20260909-112200 (1.7B, L20X, warm): default 152.0 s, eager_stage1 149.9 s, eager_both 110.9 s (first TTFA 15 s, no graphs), parallel_stage_init 94.6 s, edge 145.7 s. Edge profile now carries `orchestrator: parallel_stage_init: true`, applied by the deploy_profile selector (explicit values win); graphs stay on. hw_emulation 20260909-110229 (CPU venv, 0.6B, deploy_profile=auto): x86_cpu_avx2 (4c, fp32) TTFA 2.65 s RTF 11.9; x86_cpu_avx512 (8c) TTFA 0.68 s RTF 2.45; x86_cpu_amx (16c) TTFA 0.51 s RTF 1.72; arm64 logic-only same as avx2. Emulation rows now record the auto-detected hardware class. Adds tests/e2e/offline_inference/test_qwen3_tts_edge_profile.py (L3, one GPU). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
1 parent
285db2fa3c
commit
602e39647e
23 files changed
+8393
-3
No files matched your search
@@ -337,11 +337,41 @@ def apply_deploy_profile(model: str, args_dict: dict[str, Any]) -> dict[str, Any
|
||||
edge_path = deploy_path_for_profile(Path(default_path).stem, "edge")
|
||||
base = str(edge_path) if edge_path is not None else default_path
|
||||
args_dict["deploy_config"], _ = materialize_auto_deploy(model, base)
|
||||
_apply_profile_orchestrator_defaults(base, args_dict)
|
||||
return args_dict
|
||||
args_dict["deploy_config"] = resolve_deploy_profile_path(model, profile)
|
||||
_apply_profile_orchestrator_defaults(args_dict["deploy_config"], args_dict)
|
||||
return args_dict
|
||||
|
||||
|
||||
# Orchestrator-level settings a deploy profile may carry under a top-level
|
||||
# ``orchestrator:`` block. They are engine/CLI arguments, not stage config, so
|
||||
# ``load_deploy_config`` ignores the block and the profile selector applies it
|
||||
# here (explicit user values win; only unset/False defaults are replaced).
|
||||
PROFILE_ORCHESTRATOR_KEYS = frozenset({"parallel_stage_init", "init_timeout", "stage_init_timeout"})
|
||||
|
||||
|
||||
def profile_orchestrator_defaults(deploy_path: str | Path) -> dict[str, Any]:
|
||||
"""Return the ``orchestrator:`` block of a deploy YAML (only known keys)."""
|
||||
try:
|
||||
import yaml
|
||||
|
||||
with open(deploy_path, encoding="utf-8") as f:
|
||||
doc = yaml.safe_load(f) or {}
|
||||
except (OSError, ValueError):
|
||||
return {}
|
||||
block = doc.get("orchestrator") if isinstance(doc, dict) else None
|
||||
if not isinstance(block, dict):
|
||||
return {}
|
||||
return {k: v for k, v in block.items() if k in PROFILE_ORCHESTRATOR_KEYS}
|
||||
|
||||
|
||||
def _apply_profile_orchestrator_defaults(deploy_path: str | Path, args_dict: dict[str, Any]) -> None:
|
||||
for key, value in profile_orchestrator_defaults(deploy_path).items():
|
||||
if args_dict.get(key) in (None, False):
|
||||
args_dict[key] = value
|
||||
|
||||
|
||||
def resolve_model_config_path(model: str) -> str | None:
|
||||
"""Resolve the stage/deploy config file path from the model name.
|
||||
|
||||
|
||||
Reference in new issue
Block a user