Skip to content

Commit 62d17b5

Browse files
authored
Update bench.yml
1 parent 5361530 commit 62d17b5

File tree

1 file changed

+100
-100
lines changed

1 file changed

+100
-100
lines changed

.github/workflows/bench.yml

Lines changed: 100 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -1,110 +1,110 @@
1-
# name: 'Benchmark'
1+
name: 'Benchmark'
22

3-
# on:
4-
# pull_request:
5-
# pull_request_review:
6-
# types: [submitted]
7-
# workflow_dispatch:
3+
on:
4+
pull_request:
5+
pull_request_review:
6+
types: [submitted]
7+
workflow_dispatch:
88

9-
# jobs:
10-
# file-changes:
11-
# name: Detect File Changes
12-
# runs-on: 'ubuntu-latest'
13-
# outputs:
14-
# checkall: ${{ steps.changes.outputs.checkall }}
15-
# steps:
16-
# - name: Clone
17-
# uses: actions/checkout@v4
9+
jobs:
10+
file-changes:
11+
name: Detect File Changes
12+
runs-on: 'ubuntu-latest'
13+
outputs:
14+
checkall: ${{ steps.changes.outputs.checkall }}
15+
steps:
16+
- name: Clone
17+
uses: actions/checkout@v4
1818

19-
# - name: Detect Changes
20-
# uses: dorny/paths-filter@v3
21-
# id: changes
22-
# with:
23-
# filters: ".github/file-filter.yml"
19+
- name: Detect Changes
20+
uses: dorny/paths-filter@v3
21+
id: changes
22+
with:
23+
filters: ".github/file-filter.yml"
2424

25-
# self:
26-
# name: "${{ matrix.name }} (${{ matrix.device }})"
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-
# ) }}
31-
# needs: file-changes
32-
# strategy:
33-
# fail-fast: false
34-
# matrix:
35-
# include:
36-
# - cluster: phoenix
37-
# name: Georgia Tech | Phoenix (NVHPC)
38-
# group: phoenix
39-
# labels: gt
40-
# flag: p
41-
# device: cpu
42-
# build_script: ""
43-
# - cluster: phoenix
44-
# name: Georgia Tech | Phoenix (NVHPC)
45-
# group: phoenix
46-
# labels: gt
47-
# flag: p
48-
# device: gpu
49-
# build_script: ""
50-
# - cluster: frontier
51-
# name: Oak Ridge | Frontier (CCE)
52-
# group: phoenix
53-
# labels: frontier
54-
# flag: f
55-
# device: gpu
56-
# build_script: "bash .github/workflows/frontier/build.sh gpu bench"
57-
# runs-on:
58-
# group: ${{ matrix.group }}
59-
# labels: ${{ matrix.labels }}
60-
# timeout-minutes: 1400
61-
# env:
62-
# ACTIONS_RUNNER_FORCE_ACTIONS_NODE_VERSION: node16
63-
# ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
64-
# steps:
65-
# - name: Clone - PR
66-
# uses: actions/checkout@v4
67-
# with:
68-
# path: pr
25+
self:
26+
name: "${{ matrix.name }} (${{ matrix.device }})"
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+
) }}
31+
needs: file-changes
32+
strategy:
33+
fail-fast: false
34+
matrix:
35+
include:
36+
- cluster: phoenix
37+
name: Georgia Tech | Phoenix (NVHPC)
38+
group: phoenix
39+
labels: gt
40+
flag: p
41+
device: cpu
42+
build_script: ""
43+
- cluster: phoenix
44+
name: Georgia Tech | Phoenix (NVHPC)
45+
group: phoenix
46+
labels: gt
47+
flag: p
48+
device: gpu
49+
build_script: ""
50+
- cluster: frontier
51+
name: Oak Ridge | Frontier (CCE)
52+
group: phoenix
53+
labels: frontier
54+
flag: f
55+
device: gpu
56+
build_script: "bash .github/workflows/frontier/build.sh gpu bench"
57+
runs-on:
58+
group: ${{ matrix.group }}
59+
labels: ${{ matrix.labels }}
60+
timeout-minutes: 1400
61+
env:
62+
ACTIONS_RUNNER_FORCE_ACTIONS_NODE_VERSION: node16
63+
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
64+
steps:
65+
- name: Clone - PR
66+
uses: actions/checkout@v4
67+
with:
68+
path: pr
6969

70-
# - name: Clone - Master
71-
# uses: actions/checkout@v4
72-
# with:
73-
# repository: MFlowCode/MFC
74-
# ref: master
75-
# path: master
70+
- name: Clone - Master
71+
uses: actions/checkout@v4
72+
with:
73+
repository: MFlowCode/MFC
74+
ref: master
75+
path: master
7676

77-
# - name: Setup & Build
78-
# if: matrix.build_script != ''
79-
# run: |
80-
# (cd pr && ${{ matrix.build_script }}) &
81-
# (cd master && ${{ matrix.build_script }}) &
82-
# wait %1 && wait %2
77+
- name: Setup & Build
78+
if: matrix.build_script != ''
79+
run: |
80+
(cd pr && ${{ matrix.build_script }}) &
81+
(cd master && ${{ matrix.build_script }}) &
82+
wait %1 && wait %2
8383
84-
# - name: Bench (Master v. PR)
85-
# run: |
86-
# (cd pr && bash .github/workflows/${{ matrix.cluster }}/submit-bench.sh .github/workflows/${{ matrix.cluster }}/bench.sh ${{ matrix.device }}) &
87-
# (cd master && bash .github/workflows/${{ matrix.cluster }}/submit-bench.sh .github/workflows/${{ matrix.cluster }}/bench.sh ${{ matrix.device }}) &
88-
# wait %1 && wait %2
84+
- name: Bench (Master v. PR)
85+
run: |
86+
(cd pr && bash .github/workflows/${{ matrix.cluster }}/submit-bench.sh .github/workflows/${{ matrix.cluster }}/bench.sh ${{ matrix.device }}) &
87+
(cd master && bash .github/workflows/${{ matrix.cluster }}/submit-bench.sh .github/workflows/${{ matrix.cluster }}/bench.sh ${{ matrix.device }}) &
88+
wait %1 && wait %2
8989
90-
# - name: Generate & Post Comment
91-
# run: |
92-
# (cd pr && . ./mfc.sh load -c ${{ matrix.flag }} -m g)
93-
# (cd pr && ./mfc.sh bench_diff ../master/bench-${{ matrix.device }}.yaml ../pr/bench-${{ matrix.device }}.yaml)
90+
- name: Generate & Post Comment
91+
run: |
92+
(cd pr && . ./mfc.sh load -c ${{ matrix.flag }} -m g)
93+
(cd pr && ./mfc.sh bench_diff ../master/bench-${{ matrix.device }}.yaml ../pr/bench-${{ matrix.device }}.yaml)
9494
95-
# - name: Print Logs
96-
# if: always()
97-
# run: |
98-
# cat pr/bench-${{ matrix.device }}.* 2>/dev/null || true
99-
# cat master/bench-${{ matrix.device }}.* 2>/dev/null || true
95+
- name: Print Logs
96+
if: always()
97+
run: |
98+
cat pr/bench-${{ matrix.device }}.* 2>/dev/null || true
99+
cat master/bench-${{ matrix.device }}.* 2>/dev/null || true
100100
101-
# - name: Archive Logs
102-
# uses: actions/upload-artifact@v4
103-
# if: always()
104-
# with:
105-
# name: ${{ matrix.cluster }}-${{ matrix.device }}
106-
# path: |
107-
# pr/bench-${{ matrix.device }}.*
108-
# pr/build/benchmarks/*
109-
# master/bench-${{ matrix.device }}.*
110-
# master/build/benchmarks/*
101+
- name: Archive Logs
102+
uses: actions/upload-artifact@v4
103+
if: always()
104+
with:
105+
name: ${{ matrix.cluster }}-${{ matrix.device }}
106+
path: |
107+
pr/bench-${{ matrix.device }}.*
108+
pr/build/benchmarks/*
109+
master/bench-${{ matrix.device }}.*
110+
master/build/benchmarks/*

0 commit comments

Comments
 (0)