Skip to content

Commit 32a8292

Browse files
authored
Merge branch 'master' into frontier-CI2
2 parents 5c6acc0 + 4864d36 commit 32a8292

File tree

14 files changed

+391
-368
lines changed

14 files changed

+391
-368
lines changed

.github/workflows/bench.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: 'Benchmark'
22

3-
on:
3+
on:
4+
pull_request:
45
pull_request_review:
56
types: [submitted]
67
workflow_dispatch:
@@ -23,7 +24,10 @@ jobs:
2324

2425
self:
2526
name: ${{ matrix.name }} (${{ matrix.device }})
26-
if: github.repository == 'MFlowCode/MFC' && needs.file-changes.outputs.checkall == 'true' && ${{ github.event.review.state == 'approved' }}
27+
if: ${{ github.repository == 'MFlowCode/MFC' && needs.file-changes.outputs.checkall == 'true' && (
28+
(github.event_name == 'pull_request_review' && github.event.review.state == 'approved') ||
29+
(github.event_name == 'pull_request' && github.event.pull_request.user.login == 'sbryngelson')
30+
) }}
2731
needs: file-changes
2832
strategy:
2933
fail-fast: false

.github/workflows/frontier/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22

33
build_opts=""
4-
if [ "$1" == "gpu" ]; then
4+
if [ "$1" = "gpu" ]; then
55
build_opts="--gpu"
66
fi
77

.github/workflows/frontier/submit.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ else
1313
exit 1
1414
fi
1515

16-
if [ "$2" == "cpu" ]; then
16+
if [ "$2" = "cpu" ]; then
1717
sbatch_device_opts="\
1818
#SBATCH -n 32 # Number of cores required"
19-
elif [ "$2" == "gpu" ]; then
19+
elif [ "$2" = "gpu" ]; then
2020
sbatch_device_opts="\
2121
#SBATCH -n 8 # Number of cores required"
2222
else

.github/workflows/frontier/test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
gpus=`rocm-smi --showid | awk '{print $1}' | grep -Eo '[0-9]+' | uniq | tr '\n' ' '`
44
ngpus=`echo "$gpus" | tr -d '[:space:]' | wc -c`
55

6-
if [ "$job_device" == "gpu" ]; then
6+
if [ "$job_device" = "gpu" ]; then
77
./mfc.sh test --max-attempts 3 -j $ngpus -- -c frontier
88
else
99
./mfc.sh test --max-attempts 3 -j 32 -- -c frontier

.github/workflows/phoenix/bench.sh

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,26 @@
22

33
n_ranks=12
44

5-
if [ "$job_device" == "gpu" ]; then
5+
if [ "$job_device" = "gpu" ]; then
66
n_ranks=$(nvidia-smi -L | wc -l) # number of GPUs on node
77
gpu_ids=$(seq -s ' ' 0 $(($n_ranks-1))) # 0,1,2,...,gpu_count-1
88
device_opts="--gpu -g $gpu_ids"
99
fi
1010

11-
mkdir -p /storage/scratch1/6/sbryngelson3/mytmp_build
12-
export TMPDIR=/storage/scratch1/6/sbryngelson3/mytmp_build
11+
tmpbuild=/storage/scratch1/6/sbryngelson3/mytmp_build
12+
currentdir=$tmpbuild/run-$(( RANDOM % 900 ))
13+
mkdir -p $tmpbuild
14+
mkdir -p $currentdir
1315

14-
if ["$job_device" == "gpu"]; then
16+
export TMPDIR=$currentdir
17+
18+
if [ "$job_device" = "gpu" ]; then
1519
./mfc.sh bench --mem 12 -j $(nproc) -o "$job_slug.yaml" -- -c phoenix-bench $device_opts -n $n_ranks
1620
else
1721
./mfc.sh bench --mem 1 -j $(nproc) -o "$job_slug.yaml" -- -c phoenix-bench $device_opts -n $n_ranks
1822
fi
1923

24+
sleep 10
25+
rm -rf "$currentdir" || true
26+
2027
unset TMPDIR

.github/workflows/phoenix/submit-bench.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ sbatch_gpu_opts="\
2525
#SBATCH -G2\
2626
"
2727

28-
if [ "$2" == "cpu" ]; then
28+
if [ "$2" = "cpu" ]; then
2929
sbatch_device_opts="$sbatch_cpu_opts"
30-
elif [ "$2" == "gpu" ]; then
30+
elif [ "$2" = "gpu" ]; then
3131
sbatch_device_opts="$sbatch_gpu_opts"
3232
else
3333
usage

.github/workflows/phoenix/submit.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ sbatch_gpu_opts="\
2525
#SBATCH -G2\
2626
"
2727

28-
if [ "$2" == "cpu" ]; then
28+
if [ "$2" = "cpu" ]; then
2929
sbatch_device_opts="$sbatch_cpu_opts"
30-
elif [ "$2" == "gpu" ]; then
30+
elif [ "$2" = "gpu" ]; then
3131
sbatch_device_opts="$sbatch_gpu_opts"
3232
else
3333
usage

.github/workflows/phoenix/test.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
#!/bin/bash
22

33
build_opts=""
4-
if [ "$job_device" == "gpu" ]; then
4+
if [ "$job_device" = "gpu" ]; then
55
build_opts="--gpu"
66
fi
77

88
./mfc.sh test --dry-run -j 8 $build_opts
99

1010
n_test_threads=8
1111

12-
if [ "$job_device" == "gpu" ]; then
12+
if [ "$job_device" = "gpu" ]; then
1313
gpu_count=$(nvidia-smi -L | wc -l) # number of GPUs on node
1414
gpu_ids=$(seq -s ' ' 0 $(($gpu_count-1))) # 0,1,2,...,gpu_count-1
1515
device_opts="-g $gpu_ids"

0 commit comments

Comments
 (0)