Skip to content

Commit 0ba7aa3

Browse files
authored
runners: add new mi300x SLURM cluster (#239)
* add new mi300x stuff * nfs * nfs 2
1 parent a2f2a54 commit 0ba7aa3

3 files changed

Lines changed: 40 additions & 3 deletions

File tree

.github/configs/runners.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ mi300x:
3232
- 'mi300x-amd_4'
3333
- 'mi300x-cr_0'
3434
- 'mi300x-oci_0'
35+
- 'mi300x-amds_0'
36+
- 'mi300x-amds_1'
37+
- 'mi300x-amds_2'
38+
- 'mi300x-amds_3'
3539
mi325x:
3640
- 'mi325x-amd_0'
3741
- 'mi325x-amd_1'

.github/workflows/benchmark-tmpl.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,18 @@ jobs:
133133
RESULT_FILENAME: ${{ env.EXP_NAME }}_${{ env.PRECISION }}_${{ env.FRAMEWORK }}_tp${{ env.TP }}_ep${{ env.EP_SIZE }}_dpa_${{ env.DP_ATTENTION }}_conc${{ env.CONC }}_${{ runner.name }}
134134
run: |
135135
bash ./runners/launch_${RUNNER_NAME%%_*}.sh
136-
if [ -f "$RESULT_FILENAME.json" ]; then
137-
echo "RESULT_FILENAME=${RESULT_FILENAME}" >> $GITHUB_ENV
138-
else
136+
FOUND_RESULT_FILE=
137+
for i in {1..10}; do
138+
if [ -f "$RESULT_FILENAME.json" ]; then
139+
echo "RESULT_FILENAME=${RESULT_FILENAME}" >> $GITHUB_ENV
140+
FOUND_RESULT_FILE=true
141+
break
142+
fi
143+
echo "Waiting for result file... (attempt $i)"
144+
sleep 1
145+
done
146+
147+
if [ -z "$FOUND_RESULT_FILE" ]; then
139148
echo "Run failed: Benchmark result $RESULT_FILENAME.json not found." >&2
140149
exit 1
141150
fi

runners/launch_mi300x-amds.sh

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/usr/bin/env bash
2+
3+
export HF_HUB_CACHE_MOUNT="/nfsdata/sa/hf_hub_cache-${USER: -1}/"
4+
export PORT_OFFSET=${USER: -1}
5+
6+
PARTITION="compute"
7+
SQUASH_FILE="/nfsdata/sa/squash/$(echo "$IMAGE" | sed 's/[\/:@#]/_/g').sqsh"
8+
9+
set -x
10+
salloc --partition=$PARTITION --gres=gpu:$TP --cpus-per-task=256 --time=180 --no-shell
11+
JOB_ID=$(squeue -u $USER -h -o %A | head -n1)
12+
13+
srun --jobid=$JOB_ID bash -c "sudo enroot import -o $SQUASH_FILE docker://$IMAGE"
14+
srun --jobid=$JOB_ID \
15+
--container-image=$SQUASH_FILE \
16+
--container-mounts=$GITHUB_WORKSPACE:/workspace/,$HF_HUB_CACHE_MOUNT:$HF_HUB_CACHE \
17+
--container-mount-home \
18+
--container-writable \
19+
--container-remap-root \
20+
--container-workdir=/workspace/ \
21+
--no-container-entrypoint --export=ALL \
22+
bash benchmarks/${EXP_NAME%%_*}_${PRECISION}_mi300x_slurm.sh
23+
24+
scancel $JOB_ID

0 commit comments

Comments
 (0)