Cache exact Frontier EP lane predictions

This commit is contained in:
2026-07-15 22:07:40 +08:00
parent ed500fa016
commit 5fadc86edd
2 changed files with 18 additions and 0 deletions

View File

@@ -631,6 +631,7 @@ def run_frontier(args: argparse.Namespace) -> Path:
"quantization": "block_fp8_w8a8_dynamic_with_bf16_output_accumulation", "quantization": "block_fp8_w8a8_dynamic_with_bf16_output_accumulation",
"execution_profiles": "community_vllm_0.10.2_serving_entrypoints", "execution_profiles": "community_vllm_0.10.2_serving_entrypoints",
"moe_ep_prefill": "global_routing_then_slowest_local_ep_lane", "moe_ep_prefill": "global_routing_then_slowest_local_ep_lane",
"moe_ep_critical_lane_cache": "exact_(total_routed_tokens,layer_id)_memoization",
"kv_blocks": "measured_community_vllm_and_fixed_per_topology", "kv_blocks": "measured_community_vllm_and_fixed_per_topology",
"cpu_overhead_modeling": "disabled_no_native_community_vllm_records", "cpu_overhead_modeling": "disabled_no_native_community_vllm_records",
"end_to_end_action_specific_calibration": False, "end_to_end_action_specific_calibration": False,

View File

@@ -0,0 +1,17 @@
diff --git a/frontier/execution_time_predictor/sklearn_moe_execution_time_predictor.py b/frontier/execution_time_predictor/sklearn_moe_execution_time_predictor.py
--- a/frontier/execution_time_predictor/sklearn_moe_execution_time_predictor.py
+++ b/frontier/execution_time_predictor/sklearn_moe_execution_time_predictor.py
@@ -1,4 +1,5 @@
from typing import Any, Dict, List, Optional, TYPE_CHECKING, Union
+from functools import lru_cache
import os
import numpy as np
@@ -384,6 +385,7 @@
allocation_ratios=allocation_ratios,
)
+ @lru_cache(maxsize=None)
def _get_critical_prefill_ep_lane_tokens(
self,
total_routed_tokens: int,