Add full Qwen30 MoE profiling matrix

This commit is contained in:
2026-07-16 21:52:43 +08:00
parent 1fb777fc11
commit 4bf9bdf28f
3 changed files with 72 additions and 3 deletions

View File

@@ -0,0 +1,51 @@
#!/usr/bin/env bash
set -euo pipefail
OUTPUT_ROOT="${OUTPUT_ROOT:?OUTPUT_ROOT must be set}"
VENV_ROOT="${VENV_ROOT:-/tmp/wjh/venvs/vllm-0.20.0-cu129-profiler-v1}"
VLLM_SOURCE="${VLLM_SOURCE:-/home/admin/cpfs/wjh/agentic-kv/third_party/vllm_v20_build}"
MODEL="${MODEL:-/home/admin/cpfs/wjh/models/Qwen/Qwen3-30B-A3B}"
TOKENS=(1 8 16 32 64 128 256 512 1024 2048 4096 8192)
mkdir -p "${OUTPUT_ROOT}/logs" "${OUTPUT_ROOT}/provenance" "${OUTPUT_ROOT}/raw"
exec > >(tee -a "${OUTPUT_ROOT}/logs/full.log") 2>&1
IFS=',' read -r -a GPU_IDS <<< "${CUDA_VISIBLE_DEVICES:?fleet GPU is required}"
if [[ "${#GPU_IDS[@]}" -ne 1 ]]; then
echo "ERROR: expected exactly one GPU, got ${CUDA_VISIBLE_DEVICES}" >&2
exit 1
fi
echo "PROFILE_LAUNCH_ECHO host=$(hostname) gpu=${CUDA_VISIBLE_DEVICES} model=${MODEL} runtime=vLLM-0.20.0+cu129 operator=FlashInfer-CUTLASS-unquantized-MoE tp_local_shapes=1,2,4 tokens=${TOKENS[*]} routing=uniform_random_logits,hotset8 reference_check=on dtype=BF16 output=${OUTPUT_ROOT} expected_wall=4-12m hard_wall=1500s hard_gpu_cap=0.42_H20h"
date -u +"START_UTC=%Y-%m-%dT%H:%M:%SZ"
nvidia-smi --query-gpu=index,name,driver_version,memory.used,utilization.gpu --format=csv,noheader
test -x "${VENV_ROOT}/bin/python"
test -f "${MODEL}/config.json"
git rev-parse HEAD > "${OUTPUT_ROOT}/provenance/aituner.commit"
git -C "${VLLM_SOURCE}" rev-parse HEAD > "${OUTPUT_ROOT}/provenance/vllm-source.commit"
sha256sum profile_vllm020_moe.py run_moe_full.sh \
> "${OUTPUT_ROOT}/provenance/source.sha256"
uv pip freeze --python "${VENV_ROOT}/bin/python" \
> "${OUTPUT_ROOT}/provenance/pip-freeze.txt"
nvidia-smi --query-gpu=index,uuid,name,driver_version,memory.total \
--format=csv,noheader > "${OUTPUT_ROOT}/provenance/gpus.csv"
printf '%s\n' "${TOKENS[@]}" > "${OUTPUT_ROOT}/provenance/tokens.txt"
timeout --signal=TERM --kill-after=30s 1380 \
"${VENV_ROOT}/bin/python" profile_vllm020_moe.py \
--vllm-source "${VLLM_SOURCE}" \
--model "${MODEL}" \
--output "${OUTPUT_ROOT}/raw/moe-full.json" \
--tp 1 2 4 \
--num-tokens "${TOKENS[@]}" \
--routing-modes uniform_random_logits hotset8 \
--warmup-iters 5 \
--repeats 10 \
--check-reference
test -s "${OUTPUT_ROOT}/raw/moe-full.json"
sha256sum "${OUTPUT_ROOT}/raw/moe-full.json" "${OUTPUT_ROOT}/provenance"/* \
> "${OUTPUT_ROOT}/artifacts.sha256"
date -u +"END_UTC=%Y-%m-%dT%H:%M:%SZ"
echo "MOE_FULL_COMPLETE rows=72"