-
Notifications
You must be signed in to change notification settings - Fork 194
feat(runners): add mi325x-vultr launch script #1738
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
+233
−0
Closed
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
c4756c7
feat(runners): add mi325x-vultr launch script
Oseltamivir e9a0c41
M3
Oseltamivir 26889b5
Merge branch 'main' into add-mi325x-vultr-runner
Oseltamivir 441ba6d
Update amd-master.yaml
Oseltamivir b8c64ec
Merge branch 'main' into add-mi325x-vultr-runner
Oseltamivir 0bd8981
fix(runners): exclude chi-mi325x-pod1-027 from mi325x-vultr salloc
Oseltamivir File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
109 changes: 109 additions & 0 deletions
109
benchmarks/single_node/fixed_seq_len/minimaxm3_fp8_mi325x.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,109 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| # MiniMax-M3 MXFP8 MI325X (Vultr) single-node vLLM recipe | ||
| # (https://recipes.vllm.ai/MiniMaxAI/MiniMax-M3?hardware=mi325x). ROCm sibling of | ||
| # minimaxm3_fp8_b300.sh: same M3 essentials (--block-size 128 for MSA sparse/index | ||
| # cache alignment, --language-model-only for text-only throughput, conc-scaled | ||
| # cudagraph capture) with the MI325X recipe's --attention-backend TRITON_ATTN and the | ||
| # gfx942 ROCm idioms from minimaxm2.5_fp8_mi325x.sh (HIP_VISIBLE_DEVICES for vLLM 0.14+ | ||
| # Ray, VLLM_ROCM_USE_AITER). The vultr launcher bind-mounts the staged HF cache over | ||
| # HF_HUB_CACHE, so `hf download` reuses staged weights (or pulls ~444 GB MXFP8 on first | ||
| # run); the server is launched with MODEL directly, no MODEL_PATH split. | ||
|
|
||
| source "$(dirname "$0")/../../benchmark_lib.sh" | ||
|
|
||
| check_env_vars \ | ||
| MODEL \ | ||
| TP \ | ||
| EP_SIZE \ | ||
| DP_ATTENTION \ | ||
| CONC \ | ||
| ISL \ | ||
| OSL \ | ||
| MAX_MODEL_LEN \ | ||
| RANDOM_RANGE_RATIO \ | ||
| RESULT_FILENAME | ||
|
|
||
| if [[ "$MODEL" != /* ]]; then hf download "$MODEL"; fi | ||
|
|
||
| # Set HIP_VISIBLE_DEVICES to match ROCR_VISIBLE_DEVICES for Ray compatibility in vLLM 0.14+ | ||
| if [ -n "${ROCR_VISIBLE_DEVICES:-}" ]; then | ||
| export HIP_VISIBLE_DEVICES="$ROCR_VISIBLE_DEVICES" | ||
| fi | ||
|
|
||
| export VLLM_ROCM_USE_AITER=1 | ||
|
|
||
| if [[ -n "${SLURM_JOB_ID:-}" ]]; then | ||
| echo "JOB $SLURM_JOB_ID running on ${SLURMD_NODENAME:-unknown}" | ||
| fi | ||
|
|
||
| rocm-smi || true | ||
| amd-smi || true | ||
|
|
||
| SERVER_LOG=/workspace/server.log | ||
|
|
||
| # ~444 GB of MXFP8 weights off shared FS; engine startup can exceed the | ||
| # default 600s readiness window. | ||
| export VLLM_ENGINE_READY_TIMEOUT_S=3600 | ||
|
|
||
| if [ "${DP_ATTENTION}" = "true" ]; then | ||
| PARALLEL_ARGS="--tensor-parallel-size=1 --data-parallel-size=$TP --enable-expert-parallel" | ||
| elif [ "$EP_SIZE" -gt 1 ]; then | ||
| PARALLEL_ARGS="--tensor-parallel-size=$TP --enable-expert-parallel" | ||
| else | ||
| PARALLEL_ARGS="--tensor-parallel-size=$TP" | ||
| fi | ||
|
|
||
| # Fixed-seq-len runs don't need graphs past the request concurrency: capture | ||
| # up to the next power of two >= CONC, capped at vLLM's 2048 ceiling. | ||
| CAPTURE_SIZE=4 | ||
| while (( CAPTURE_SIZE < CONC )); do CAPTURE_SIZE=$((CAPTURE_SIZE * 2)); done | ||
| (( CAPTURE_SIZE > 2048 )) && CAPTURE_SIZE=2048 | ||
|
|
||
| if [ "${EVAL_ONLY}" = "true" ]; then | ||
| setup_eval_context | ||
| MAX_MODEL_LEN="$EVAL_MAX_MODEL_LEN" | ||
| fi | ||
| # Start GPU monitoring (power, temperature, clocks every second) | ||
| start_gpu_monitor | ||
|
|
||
| set -x | ||
| vllm serve "$MODEL" --host 0.0.0.0 --port $PORT \ | ||
| $PARALLEL_ARGS \ | ||
| --gpu-memory-utilization 0.90 \ | ||
| --max-model-len $MAX_MODEL_LEN \ | ||
| --block-size 128 \ | ||
| --attention-backend TRITON_ATTN \ | ||
| --language-model-only \ | ||
| --max-cudagraph-capture-size $CAPTURE_SIZE \ | ||
| --max-num-batched-tokens "$((ISL * 2 ))" \ | ||
| --no-enable-prefix-caching \ | ||
| --trust-remote-code > $SERVER_LOG 2>&1 & | ||
|
|
||
| SERVER_PID=$! | ||
|
|
||
| # Wait for server to be ready | ||
| wait_for_server_ready --port "$PORT" --server-log "$SERVER_LOG" --server-pid "$SERVER_PID" | ||
|
|
||
| run_benchmark_serving \ | ||
| --model "$MODEL" \ | ||
| --port "$PORT" \ | ||
| --backend vllm \ | ||
| --input-len "$ISL" \ | ||
| --output-len "$OSL" \ | ||
| --random-range-ratio "$RANDOM_RANGE_RATIO" \ | ||
| --num-prompts "$((CONC * 10))" \ | ||
| --max-concurrency "$CONC" \ | ||
| --result-filename "$RESULT_FILENAME" \ | ||
| --result-dir /workspace/ \ | ||
| --trust-remote-code | ||
|
|
||
| # After throughput, run evaluation only if RUN_EVAL is true | ||
| if [ "${RUN_EVAL}" = "true" ]; then | ||
| run_eval --framework lm-eval --port "$PORT" | ||
| append_lm_eval_summary | ||
| fi | ||
|
|
||
| # Stop GPU monitoring | ||
| stop_gpu_monitor | ||
| set +x |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,72 @@ | ||
| #!/usr/bin/env bash | ||
| set -euo pipefail | ||
|
|
||
| # Pre-staged model weights / HF hub cache for the vultr mi325x fleet. Bind-mounted | ||
| # over the container-side HF_HUB_CACHE (/mnt/hf_hub_cache/); the bench scripts' | ||
| # `hf download "$MODEL"` resolves against the models--org--name caches already | ||
| # staged here (e.g. DeepSeek-R1-0528, Qwen3.5-397B-A17B-FP8, GLM-5-FP8) so weights | ||
| # are not re-downloaded from HF in CI. | ||
| export HF_HUB_CACHE_MOUNT="/nfsdata/sa/models/" | ||
|
|
||
| # enroot cache (import layer cache + the imported .sqsh images) for this fleet. | ||
| # Node-local ext4 present at the same path on every compute node; import and run | ||
| # happen in the same Slurm job on a single node, so node-local storage suffices. | ||
| export ENROOT_CACHE_PATH="/enroot/sa" | ||
| mkdir -p "$ENROOT_CACHE_PATH" | ||
|
Oseltamivir marked this conversation as resolved.
|
||
|
|
||
| PARTITION="compute" | ||
| SQUASH_FILE="$ENROOT_CACHE_PATH/$(echo "$IMAGE" | sed 's/[\/:@#]/_/g').sqsh" | ||
| LOCK_FILE="${SQUASH_FILE}.lock" | ||
|
|
||
| cleanup_stale_benchmark_logs() { | ||
| if [[ -n "${GITHUB_WORKSPACE:-}" ]]; then | ||
| sudo -n rm -rf "$GITHUB_WORKSPACE/benchmark_logs" 2>/dev/null || \ | ||
| rm -rf "$GITHUB_WORKSPACE/benchmark_logs" 2>/dev/null || true | ||
| fi | ||
| } | ||
| cleanup_stale_benchmark_logs | ||
|
|
||
| set -x | ||
|
|
||
| # Exclude known-broken mi325x nodes: | ||
| # chi-mi325x-pod1-121: has a history of failing enroot container image import | ||
| # (root-caused via #1467/#1468/#1469 sweep failures); | ||
| # excluded for the same reason as the amds fleet. | ||
| # chi-mi325x-pod1-027: fails SLURM resume/boot — salloc grants an allocation then | ||
| # relinquishes it with "Something is wrong with the boot of the | ||
| # nodes" (run 27454108525), which gated the whole sweep at the | ||
| # canary; excluded until the node is repaired. | ||
| JOB_ID=$(set +o pipefail; salloc --partition=$PARTITION --exclude=chi-mi325x-pod1-121.ord.vultr.cpe.ice.amd.com,chi-mi325x-pod1-027.ord.vultr.cpe.ice.amd.com --gres=gpu:$TP --cpus-per-task=256 --time=480 --no-shell --job-name="$RUNNER_NAME" 2>&1 | tee /dev/stderr | grep -oP 'Granted job allocation \K[0-9]+') | ||
|
|
||
| if [ -z "$JOB_ID" ]; then | ||
| echo "ERROR: salloc failed to allocate a job" >&2 | ||
| exit 1 | ||
| fi | ||
|
|
||
| export PORT=$(( 40000 + (JOB_ID % 10000) )) | ||
|
|
||
| trap 'rc=$?; scancel "$JOB_ID" 2>/dev/null || true; cleanup_stale_benchmark_logs; exit "$rc"' EXIT | ||
|
|
||
| # Use flock to serialize concurrent imports to the same squash file | ||
| srun --jobid="$JOB_ID" --job-name="$RUNNER_NAME" bash -c " | ||
| set -euo pipefail | ||
| exec 9>\"$LOCK_FILE\" | ||
| flock -w 600 9 || { echo 'Failed to acquire lock for $SQUASH_FILE' >&2; exit 1; } | ||
| if unsquashfs -l \"$SQUASH_FILE\" > /dev/null 2>&1; then | ||
| echo 'Squash file already exists and is valid, skipping import' | ||
| else | ||
| rm -f \"$SQUASH_FILE\" | ||
| enroot import -o \"$SQUASH_FILE\" docker://$IMAGE | ||
| fi | ||
| " | ||
| srun --jobid="$JOB_ID" \ | ||
| --container-image="$SQUASH_FILE" \ | ||
| --container-mounts="$GITHUB_WORKSPACE:/workspace/,$HF_HUB_CACHE_MOUNT:$HF_HUB_CACHE" \ | ||
| --container-mount-home \ | ||
| --container-writable \ | ||
| --container-remap-root \ | ||
| --container-workdir=/workspace/ \ | ||
| --no-container-entrypoint --export=ALL \ | ||
| bash benchmarks/single_node/${SCENARIO_SUBDIR}${EXP_NAME%%_*}_${PRECISION}_mi325x.sh | ||
|
|
||
| scancel $JOB_ID | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrong runner type in config
High Severity
The new Vultr MiniMax-M3 entry sets
runnertomi325x, so CI schedules the AMDS fleet andlaunch_mi325x-amds.shinstead ofmi325x-vultrandlaunch_mi325x-vultr.sh. Staged weights at/nfsdata/sa/models/and enroot cache at/enroot/saare never used for this config.Reviewed by Cursor Bugbot for commit 441ba6d. Configure here.