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

@@ -25,6 +25,7 @@ ALLREDUCE_CSV="${ALLREDUCE_CSV:-/home/admin/cpfs/wjh/aituner/aituner-graph-piece
CUSTOM_PYTHON_DEPS="${CUSTOM_PYTHON_DEPS:-${EXPERIMENT_ROOT}/python-deps-v2}"
BASE_PYTHON_DEPS="${BASE_PYTHON_DEPS:-/home/admin/cpfs/wjh/venvs/qwen36-vllm-0.20.2/lib/python3.12/site-packages}"
SIM_GENERATION="${SIM_GENERATION:-v4}"
PREDICTOR_CACHE_GENERATION="${PREDICTOR_CACHE_GENERATION:-${SIM_GENERATION}}"
RUNNER="${CHECKOUT}/runs/frontier-fidelity-envelope-v1/run_frontier_qwen30_exact_trace_surface.py"
for path in "${TRACES_ROOT}/manifest.json" "${FRONTIER_SOURCE}" \
@@ -35,10 +36,15 @@ for path in "${TRACES_ROOT}/manifest.json" "${FRONTIER_SOURCE}" \
done
run_mode() {
local prefix_mode="$1" output_root prefix_flag family
local prefix_mode="$1" output_root predictor_cache_root prefix_flag family
local -a families traces configs command
output_root="${EXPERIMENT_ROOT}/sim-${SIM_GENERATION}/tp${TP}-prefix-${prefix_mode}"
predictor_cache_root="${EXPERIMENT_ROOT}/sim-${PREDICTOR_CACHE_GENERATION}/tp${TP}-prefix-${prefix_mode}/cache"
mkdir -p "${output_root}/provenance"
[[ -d "${predictor_cache_root}" ]] || {
echo "ERROR: missing predictor cache ${predictor_cache_root}" >&2
exit 1
}
if [[ "${prefix_mode}" == "true" ]]; then
prefix_flag="--prefix-caching"
@@ -99,6 +105,7 @@ run_mode() {
--kernel-profile-root "${KERNEL_PROFILE_ROOT}" \
--python-deps "${CUSTOM_PYTHON_DEPS}" \
--output-root "${output_root}" \
--predictor-cache-root "${predictor_cache_root}" \
"${command[@]}" "${configs[@]}" \
--rate-contract trace-window "${prefix_flag}" \
--cc-backend vidur --allreduce-csv "${ALLREDUCE_CSV}" \