Skip to content

Commit 8c2ffc7

Browse files
authored
Merge branch 'chore/add-more-nv-runners' into sahithi/b200-multi-runner
2 parents 9fe7bc0 + 6b4504d commit 8c2ffc7

7 files changed

Lines changed: 277 additions & 170 deletions

File tree

‎.github/configs/nvidia-master.yaml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2508,7 +2508,7 @@ dsr1-fp8-h100-dynamo-trt:
25082508
image: nvcr.io/nvidia/ai-dynamo/tensorrtllm-runtime:0.8.1.post3
25092509
model: deepseek-ai/DeepSeek-R1-0528
25102510
model-prefix: dsr1
2511-
runner: h100-multinode-slurm
2511+
runner: h100-multinode
25122512
precision: fp8
25132513
framework: dynamo-trt
25142514
multinode: true
@@ -3047,7 +3047,7 @@ dsr1-fp8-h100-dynamo-sglang:
30473047
image: lmsysorg/sglang:v0.5.8-cu130
30483048
model: deepseek-ai/DeepSeek-R1-0528
30493049
model-prefix: dsr1
3050-
runner: h100-multinode-slurm
3050+
runner: h100-multinode
30513051
precision: fp8
30523052
framework: dynamo-sglang
30533053
multinode: true

‎.github/configs/runners.yaml‎

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,22 @@ h100:
33
- 'h100-cr_1'
44
- 'h100-cw_0'
55
- 'h100-cw_1'
6+
- 'h100-dgxc-slurm_0'
7+
- 'h100-dgxc-slurm_1'
8+
- 'h100-dgxc-slurm_2'
9+
- 'h100-dgxc-slurm_3'
10+
- 'h100-dgxc-slurm_4'
11+
- 'h100-dgxc-slurm_5'
12+
- 'h100-dgxc-slurm_6'
13+
- 'h100-dgxc-slurm_7'
14+
- 'h100-dgxc-slurm_8'
15+
- 'h100-dgxc-slurm_9'
16+
- 'h100-dgxc-slurm_10'
17+
- 'h100-dgxc-slurm_11'
18+
h100-multinode:
19+
- 'h100-dgxc-slurm_9'
20+
- 'h100-dgxc-slurm_10'
21+
- 'h100-dgxc-slurm_11'
622
h200:
723
- 'h200-cw_0'
824
- 'h200-cw_1'
@@ -60,6 +76,8 @@ mi355x-disagg:
6076
- 'mi355x-amds_2'
6177
gb200:
6278
- gb200-nv_0
79+
- gb200-nv_1
80+
- gb200-nv_2
6381
b200-multinode-slurm:
6482
- 'b200-dgxc-slurm_0'
6583
- 'b200-dgxc-slurm_1'
@@ -68,5 +86,3 @@ b300:
6886
- 'b300-nv_0'
6987
gb300:
7088
- 'gb300-nv_0'
71-
h100-multinode-slurm:
72-
- 'h100-dgxc-slurm_0'

‎.github/workflows/benchmark-multinode-tmpl.yml‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,11 +120,19 @@ jobs:
120120
- name: Slurm cleanup (pre-run)
121121
run: &slurm-cleanup |
122122
if command -v squeue >/dev/null 2>&1; then
123+
<<<<<<< sahithi/b200-multi-runner
123124
if [[ "${{ runner.name }}" == mi355x-amds* ]] || [[ "${{ runner.name }}" == b200-dgxc-slurm* ]]; then
124125
echo "[Slurm] Cleaning up jobs with name: ${{ runner.name }} for user: $USER ..."
125126
scancel -u "$USER" --name="${{ runner.name }}" || true
126127
while [ -n "$(squeue -u "$USER" --name='${{ runner.name }}' --noheader --format='%i')" ]; do
127128
squeue -u "$USER" --name="${{ runner.name }}"
129+
=======
130+
if [[ "${{ runner.name }}" == mi355x-amds* || "${{ runner.name }}" == gb200-nv* || "${{ runner.name }}" == h100-dgxc-slurm* ]]; then
131+
echo "[Slurm] Cleaning up jobs with name: ${{ runner.name }} ..."
132+
scancel --name="${{ runner.name }}" || true
133+
while [ -n "$(squeue --name='${{ runner.name }}' --noheader --format='%i')" ]; do
134+
squeue --name="${{ runner.name }}"
135+
>>>>>>> chore/add-more-nv-runners
128136
sleep 5
129137
done
130138
else
@@ -188,6 +196,14 @@ jobs:
188196
name: bmk_${{ env.RESULT_FILENAME }}
189197
path: agg_${{ env.RESULT_FILENAME }}_*.json
190198

199+
- name: Upload logs
200+
if: always()
201+
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
202+
with:
203+
name: multinode_server_logs_${{ env.RESULT_FILENAME }}
204+
path: multinode_server_logs.tar.gz
205+
if-no-files-found: ignore
206+
191207
- name: Slurm cleanup (post-run)
192208
if: always()
193209
run: *slurm-cleanup

‎.github/workflows/benchmark-tmpl.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ jobs:
108108

109109
# Cleanup SLURM resources
110110
if command -v squeue >/dev/null 2>&1; then
111-
if [[ "${{ runner.name }}" == mi355x-amds* ]]; then
111+
if [[ "${{ runner.name }}" == mi355x-amds* || "${{ runner.name }}" == gb200-nv* || "${{ runner.name }}" == h100-dgxc-slurm* ]]; then
112112
echo "[Slurm] Cleaning up jobs with name: ${{ runner.name }} ..."
113113
scancel --name="${{ runner.name }}" || true
114114
while [ -n "$(squeue --name='${{ runner.name }}' --noheader --format='%i')" ]; do

‎benchmarks/benchmark_lib.sh‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,15 @@ wait_for_server_ready() {
7777
return 1
7878
fi
7979

80+
# Wait for server log file to be created (container startup may delay this)
81+
while [ ! -f "$server_log" ]; do
82+
if ! kill -0 "$server_pid" 2>/dev/null; then
83+
echo "Server died before creating log file. Exiting."
84+
exit 1
85+
fi
86+
sleep 1
87+
done
88+
8089
# Show logs until server is ready
8190
tail -f -n +1 "$server_log" &
8291
local TAIL_PID=$!

‎runners/launch_gb200-nv.sh‎

Lines changed: 43 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -41,19 +41,19 @@ fi
4141
# Set up environment variables for SLURM
4242
export SLURM_PARTITION="batch"
4343
export SLURM_ACCOUNT="benchmark"
44-
export SLURM_JOB_NAME="benchmark-dynamo.job"
4544

4645
NGINX_IMAGE="nginx:1.27.4"
4746

4847
SQUASH_FILE="/mnt/lustre01/users-public/sa-shared/$(echo "$IMAGE" | sed 's/[\/:@#]/_/g').sqsh"
4948
NGINX_SQUASH_FILE="/mnt/lustre01/users-public/sa-shared/$(echo "$NGINX_IMAGE" | sed 's/[\/:@#]/_/g').sqsh"
5049

51-
srun -N 1 -A $SLURM_ACCOUNT -p $SLURM_PARTITION bash -c "enroot import -o $SQUASH_FILE docker://$IMAGE"
52-
srun -N 1 -A $SLURM_ACCOUNT -p $SLURM_PARTITION bash -c "enroot import -o $NGINX_SQUASH_FILE docker://$NGINX_IMAGE"
50+
enroot import -o $SQUASH_FILE docker://$IMAGE
51+
enroot import -o $NGINX_SQUASH_FILE docker://$NGINX_IMAGE
5352

5453
export ISL="$ISL"
5554
export OSL="$OSL"
5655

56+
# Legacy path that doesn't use srt-slurm
5757
if [[ $FRAMEWORK == "dynamo-sglang" && -z "$CONFIG_FILE" ]]; then
5858
export IMAGE=$SQUASH_FILE
5959
export SGL_SLURM_JOBS_PATH="dynamo/examples/backends/sglang/slurm_jobs"
@@ -66,7 +66,7 @@ if [[ $FRAMEWORK == "dynamo-sglang" && -z "$CONFIG_FILE" ]]; then
6666
bash "benchmarks/${BENCHMARK_SUBDIR}/${SCRIPT_NAME}"
6767
# Wait for all jobs to complete
6868
echo "Waiting for all jobs to complete..."
69-
while [ -n "$(squeue -u $USER --noheader --format='%i')" ]; do
69+
while [ -n "$(squeue -j "$jobid" --noheader)" ]; do
7070
echo "Jobs still running..."
7171
squeue --steps -u $USER
7272
sleep 30
@@ -164,13 +164,11 @@ cat srtslurm.yaml
164164
echo "Running make setup..."
165165
make setup ARCH=aarch64
166166

167-
# these 2 lines are for debugging
168-
# TODO: remove when merge
169-
echo "Make setup complete"
170-
ls configs/
171-
172167
echo "Submitting job with srtctl..."
173168

169+
# Override the job name in the config file with the runner name
170+
sed -i "s/^name:.*/name: \"${RUNNER_NAME}\"/" "$CONFIG_FILE"
171+
174172
if [[ "$FRAMEWORK" == "dynamo-sglang" ]]; then
175173
SRTCTL_OUTPUT=$(srtctl apply -f "$CONFIG_FILE" --tags "gb200,${MODEL_PREFIX},${PRECISION},${ISL}x${OSL},infmax-$(date +%Y%m%d)" --setup-script install-torchao.sh 2>&1)
176174
else
@@ -180,27 +178,50 @@ echo "$SRTCTL_OUTPUT"
180178

181179
JOB_ID=$(echo "$SRTCTL_OUTPUT" | grep -oP '✅ Job \K[0-9]+' || echo "$SRTCTL_OUTPUT" | grep -oP 'Job \K[0-9]+')
182180

181+
set +x
182+
183183
if [ -z "$JOB_ID" ]; then
184184
echo "Error: Failed to extract JOB_ID from srtctl output"
185185
exit 1
186186
fi
187187

188188
echo "Extracted JOB_ID: $JOB_ID"
189189

190-
# Wait for this specific job to complete
191-
echo "Waiting for job $JOB_ID to complete..."
192-
while [ -n "$(squeue -j $JOB_ID --noheader 2>/dev/null)" ]; do
193-
echo "Job $JOB_ID still running..."
194-
squeue -j $JOB_ID
195-
sleep 30
196-
done
197-
echo "Job $JOB_ID completed!"
198-
199-
echo "Collecting results..."
200-
201190
# Use the JOB_ID to find the logs directory
202191
# srtctl creates logs in outputs/JOB_ID/logs/
203192
LOGS_DIR="outputs/$JOB_ID/logs"
193+
LOG_FILE="$LOGS_DIR/sweep_${JOB_ID}.log"
194+
195+
# Wait for log file to appear (also check job is still alive)
196+
while ! ls "$LOG_FILE" &>/dev/null; do
197+
if ! squeue -j "$JOB_ID" --noheader 2>/dev/null | grep -q "$JOB_ID"; then
198+
echo "ERROR: Job $JOB_ID failed before creating log file"
199+
scontrol show job "$JOB_ID"
200+
exit 1
201+
fi
202+
echo "Waiting for JOB_ID $JOB_ID to begin and $LOG_FILE to appear..."
203+
sleep 5
204+
done
205+
206+
# Poll for job completion in background
207+
(
208+
while squeue -j "$JOB_ID" --noheader 2>/dev/null | grep -q "$JOB_ID"; do
209+
sleep 10
210+
done
211+
) &
212+
POLL_PID=$!
213+
214+
echo "Tailing LOG_FILE: $LOG_FILE"
215+
216+
# Stream the log file until job completes (-F follows by name, polls instead of inotify for NFS)
217+
tail -F -s 2 -n+1 "$LOG_FILE" --pid=$POLL_PID 2>/dev/null
218+
219+
wait $POLL_PID
220+
221+
set -x
222+
223+
echo "Job $JOB_ID completed!"
224+
echo "Collecting results..."
204225

205226
if [ ! -d "$LOGS_DIR" ]; then
206227
echo "Warning: Logs directory not found at $LOGS_DIR"
@@ -209,13 +230,8 @@ fi
209230

210231
echo "Found logs directory: $LOGS_DIR"
211232

212-
cat $LOGS_DIR/sweep_$JOB_ID.log
213-
214-
for file in $LOGS_DIR/*; do
215-
if [ -f "$file" ]; then
216-
tail -n 500 $file
217-
fi
218-
done
233+
cp -r "$LOGS_DIR" "$GITHUB_WORKSPACE/LOGS"
234+
tar czf "$GITHUB_WORKSPACE/multinode_server_logs.tar.gz" -C "$LOGS_DIR" .
219235

220236
# Find all result subdirectories
221237
RESULT_SUBDIRS=$(find "$LOGS_DIR" -maxdepth 1 -type d -name "*isl*osl*" 2>/dev/null)
@@ -254,10 +270,4 @@ else
254270
done
255271
fi
256272

257-
# Cleanup
258-
echo "Cleaning up..."
259-
deactivate 2>/dev/null || true
260-
rm -rf .venv
261-
echo "Cleanup complete"
262-
263273
echo "All result files processed"

0 commit comments

Comments
 (0)