Skip to content

Commit 45778e2

Browse files
committed
[Benchmark] Provide a way to pass custom list of kernels
stack-info: PR: #906, branch: oulgen/stack/140
1 parent cdc8259 commit 45778e2

File tree

2 files changed

+37
-8
lines changed

2 files changed

+37
-8
lines changed

.github/workflows/benchmark_dispatch.yml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,19 @@ on:
1818
required: false
1919
type: boolean
2020
default: false
21-
schedule:
22-
- cron: '0 8 * * *' # Runs at midnight PST (8 AM UTC)
21+
kernels:
22+
description: 'Comma-separated list of kernels to benchmark'
23+
required: false
24+
type: string
25+
default: "softmax,jsd,welford,kl_div,layer_norm,layer_norm-bwd,rms_norm,rms_norm-bwd,cross_entropy,flash_attention,gemm,grouped_gemm"
2326

2427
jobs:
2528
gen-matrix-h100:
26-
if: ${{ github.event.inputs.run_h100 == 'true' || github.event_name == 'schedule' }}
29+
if: ${{ github.event.inputs.run_h100 == 'true' }}
2730
uses: ./.github/workflows/compute-benchmark-matrix.yml
2831
with:
2932
max-runners: 12
30-
kernels: "softmax,jsd,welford,kl_div,layer_norm,layer_norm-bwd,rms_norm,rms_norm-bwd,cross_entropy,flash_attention,gemm,grouped_gemm"
33+
kernels: ${{ github.event.inputs.kernels }}
3134

3235
run-h100:
3336
needs: gen-matrix-h100
@@ -49,10 +52,10 @@ jobs:
4952

5053
gen-matrix-b200:
5154
uses: ./.github/workflows/compute-benchmark-matrix.yml
52-
if: ${{ github.event.inputs.run_b200 == 'true' || github.event_name == 'schedule' }}
55+
if: ${{ github.event.inputs.run_b200 == 'true' }}
5356
with:
5457
max-runners: 12
55-
kernels: "softmax,jsd,welford,kl_div,layer_norm,layer_norm-bwd,rms_norm,rms_norm-bwd,cross_entropy,flash_attention,gemm,grouped_gemm"
58+
kernels: ${{ github.event.inputs.kernels }}
5659

5760
run-b200:
5861
needs: gen-matrix-b200
@@ -74,10 +77,10 @@ jobs:
7477

7578
gen-matrix-mi325x:
7679
uses: ./.github/workflows/compute-benchmark-matrix.yml
77-
if: ${{ github.event.inputs.run_mi325x == 'true' || github.event_name == 'schedule' }}
80+
if: ${{ github.event.inputs.run_mi325x == 'true' }}
7881
with:
7982
max-runners: 6
80-
kernels: "softmax,jsd,welford,kl_div,layer_norm,layer_norm-bwd,rms_norm,rms_norm-bwd,cross_entropy,flash_attention,gemm,grouped_gemm"
83+
kernels: ${{ github.event.inputs.kernels }}
8184

8285
run-mi325x:
8386
needs: gen-matrix-mi325x
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Benchmark Nightly
2+
3+
on:
4+
schedule:
5+
- cron: '0 8 * * *' # Runs at midnight PST (8 AM UTC)
6+
7+
jobs:
8+
dispatch-benchmark:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Dispatch benchmark_dispatch workflow
12+
uses: actions/github-script@v7
13+
with:
14+
github-token: ${{ secrets.GITHUB_TOKEN }}
15+
script: |
16+
await github.rest.actions.createWorkflowDispatch({
17+
owner: context.repo.owner,
18+
repo: context.repo.repo,
19+
workflow_id: 'benchmark_dispatch.yml',
20+
ref: 'main',
21+
inputs: {
22+
run_h100: 'true',
23+
run_b200: 'true',
24+
run_mi325x: 'true'
25+
}
26+
})

0 commit comments

Comments
 (0)