Skip to content

Commit 1387951

Browse files
committed
add bench!
1 parent 8623c31 commit 1387951

File tree

2 files changed

+26
-2
lines changed

2 files changed

+26
-2
lines changed

.github/workflows/bench.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,10 @@ jobs:
2525
strategy:
2626
matrix:
2727
device: ['cpu', 'gpu']
28+
lbl: ['gt', 'ice']
2829
runs-on:
2930
group: phoenix
30-
labels: gt
31+
labels: ${{ matrix.lbl }}
3132
timeout-minutes: 1400
3233
env:
3334
ACTIONS_RUNNER_FORCE_ACTIONS_NODE_VERSION: node16
@@ -46,11 +47,19 @@ jobs:
4647
path: master
4748

4849
- name: Bench (Master v. PR)
50+
if: matrix.lbl == 'phoenix'
4951
run: |
5052
(cd pr && bash .github/workflows/phoenix/submit.sh .github/workflows/phoenix/bench.sh ${{ matrix.device }}) &
5153
(cd master && bash .github/workflows/phoenix/submit.sh .github/workflows/phoenix/bench.sh ${{ matrix.device }}) &
5254
wait %1 && wait %2
5355
56+
- name: Bench (Master v. PR)
57+
if: matrix.lbl == 'ice'
58+
run: |
59+
(cd pr && bash .github/workflows/ice/submit.sh .github/workflows/ice/bench.sh ${{ matrix.device }}) &
60+
(cd master && bash .github/workflows/ice/submit.sh .github/workflows/ice/bench.sh ${{ matrix.device }}) &
61+
wait %1 && wait %2
62+
5463
- name: Generate & Post Comment
5564
run: |
5665
(cd pr && . ./mfc.sh load -c p -m g)
@@ -60,7 +69,7 @@ jobs:
6069
uses: actions/upload-artifact@v4
6170
if: always()
6271
with:
63-
name: logs-${{ matrix.device }}
72+
name: logs-${{ matrix.device }}-${{matrix.lbl}}
6473
path: |
6574
pr/bench-${{ matrix.device }}.*
6675
pr/build/benchmarks/*

.github/workflows/ice/bench.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
3+
n_ranks=12
4+
5+
if [ "$job_device" == "gpu" ]; then
6+
n_ranks=$(nvidia-smi -L | wc -l) # number of GPUs on node
7+
gpu_ids=$(seq -s ' ' 0 $(($n_ranks-1))) # 0,1,2,...,gpu_count-1
8+
device_opts="--gpu -g $gpu_ids"
9+
fi
10+
11+
if ["$job_device" == "gpu"]; then
12+
./mfc.sh bench --mem 12 -j $(nproc) -o "$job_slug.yaml" -- -c phoenix $device_opts -n $n_ranks
13+
else
14+
./mfc.sh bench --mem 1 -j $(nproc) -o "$job_slug.yaml" -- -c phoenix $device_opts -n $n_ranks
15+
fi

0 commit comments

Comments
 (0)