Skip to content

Commit f8bad83

Browse files
authored
[Benchmark CI] Allow specifying custom env vars via UI (#972)
1 parent 7cc0947 commit f8bad83

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

.github/workflows/benchmark.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ on:
2424
kernels:
2525
required: true
2626
type: string
27+
env-vars:
28+
required: false
29+
type: string
30+
default: ""
2731

2832
jobs:
2933
benchmark:
@@ -142,7 +146,7 @@ jobs:
142146
echo "Available implementations for $kernel: $IMPLS"
143147
144148
# Do autotuning but do not record the results
145-
python benchmarks/run.py \
149+
${{ inputs.env-vars }} python benchmarks/run.py \
146150
--op $kernel \
147151
--metrics speedup,accuracy \
148152
--latency-measure-mode triton_do_bench \
@@ -157,7 +161,7 @@ jobs:
157161
sleep 2m
158162
159163
# Run again with cache and record results
160-
python benchmarks/run.py \
164+
${{ inputs.env-vars }} python benchmarks/run.py \
161165
--op $kernel \
162166
--metrics speedup,accuracy \
163167
--latency-measure-mode triton_do_bench \

.github/workflows/benchmark_dispatch.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ on:
2323
required: false
2424
type: string
2525
default: "softmax,jsd,welford,kl_div,int4_gemm,layer_norm,layer_norm-bwd,rms_norm,rms_norm-bwd,cross_entropy,flash_attention,gemm,grouped_gemm"
26+
env_vars:
27+
description: 'Environment variables for benchmark runner'
28+
required: false
29+
type: string
30+
default: ""
2631

2732
jobs:
2833
gen-matrix-h100:
@@ -49,6 +54,7 @@ jobs:
4954
container-options: --gpus all
5055
alias: h100
5156
kernels: ${{ matrix.kernels }}
57+
env-vars: ${{ github.event.inputs.env_vars }}
5258

5359
gen-matrix-b200:
5460
uses: ./.github/workflows/compute-benchmark-matrix.yml
@@ -74,6 +80,7 @@ jobs:
7480
container-options: --gpus all
7581
alias: b200
7682
kernels: ${{ matrix.kernels }}
83+
env-vars: ${{ github.event.inputs.env_vars }}
7784

7885
gen-matrix-mi325x:
7986
uses: ./.github/workflows/compute-benchmark-matrix.yml
@@ -99,3 +106,4 @@ jobs:
99106
container-options: --device=/dev/kfd --device=/dev/dri
100107
alias: mi325x
101108
kernels: ${{ matrix.kernels }}
109+
env-vars: ${{ github.event.inputs.env_vars }}

0 commit comments

Comments
 (0)