experiment: reuse predictors across load contracts

This commit is contained in:
2026-07-20 18:51:31 +08:00
parent 809ad9ffef
commit e651ecc923
4 changed files with 22 additions and 8 deletions

View File

@@ -67,6 +67,11 @@ def parse_args() -> argparse.Namespace:
parser.add_argument("--kernel-profile-root", type=Path)
parser.add_argument("--python-deps", type=Path, required=True)
parser.add_argument("--output-root", type=Path, required=True)
parser.add_argument(
"--predictor-cache-root",
type=Path,
help="Reuse a validated predictor cache outside the output root.",
)
parser.add_argument(
"--trace",
action="append",
@@ -558,9 +563,10 @@ def main() -> None:
)
config_results = []
predictor_cache_root = args.predictor_cache_root or args.output_root / "cache"
for config in selected:
loads = []
config_knobs = BASE.knobs(config, paths, args.output_root / "cache")
config_knobs = BASE.knobs(config, paths, predictor_cache_root)
config_knobs["enable_prefix_caching"] = args.prefix_caching
config_knobs["prediction_max_tokens_per_request"] = 40960
config_knobs["decode_cuda_graph_mode"] = args.decode_cuda_graph_mode
@@ -614,7 +620,7 @@ def main() -> None:
command.extend(
[
"--metrics_config_cache_dir",
str(args.output_root / "cache"),
str(predictor_cache_root),
]
)
if args.align_real_graph_runtime:
@@ -829,7 +835,7 @@ def main() -> None:
"arrival": "original_trace_timestamp_and_order",
"input_output": "exact_source_values",
"store_stage_batch_ledger": args.store_stage_batch_ledger,
"predictor_cache_root": str(args.output_root / "cache"),
"predictor_cache_root": str(predictor_cache_root),
"ttft_slo": "1000ms + 1000ms * input_tokens / 8000",
"tpot_slos_ms": TPOT_SLOS_MS,
"primary_tpot_slo_ms": 150.0,