Skip to content

Commit 388223d

Browse files
authored
Add AMD to benchmarks (#717)
1 parent c934dad commit 388223d

File tree

2 files changed

+39
-3
lines changed

2 files changed

+39
-3
lines changed

.github/workflows/benchmark.yml

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,30 @@ on:
2121
alias:
2222
required: true
2323
type: string
24+
max-runners:
25+
required: true
26+
type: number
27+
description: "Maximum parallel runners to determine shards"
2428

2529
jobs:
30+
compute-matrix:
31+
runs-on: ubuntu-latest
32+
outputs:
33+
matrix: ${{ steps.gen.outputs.matrix }}
34+
steps:
35+
- id: gen
36+
run: |
37+
n="${{ inputs.max-runners }}"
38+
shards=$(seq 0 $((n-1)) | paste -sd, -)
39+
echo "matrix={\"shard\": [${shards}], \"num_shards\": [${n}]}" >> $GITHUB_OUTPUT
40+
2641
benchmark:
2742
name: benchmark-${{ inputs.runtime-version }}-py${{ inputs.python-version }}-${{ inputs.alias }}
43+
needs: compute-matrix
2844

2945
strategy:
3046
fail-fast: false
31-
matrix:
32-
shard: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
33-
num_shards: [12]
47+
matrix: ${{ fromJSON(needs.compute-matrix.outputs.matrix) }}
3448

3549
container:
3650
image: ${{ inputs.image }}

.github/workflows/benchmark_dispatch.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ on:
1313
required: false
1414
type: boolean
1515
default: true
16+
run_mi325x:
17+
description: 'Run benchmark on MI325X'
18+
required: false
19+
type: boolean
20+
default: false
1621
schedule:
1722
- cron: '0 8 * * *' # Runs at midnight PST (8 AM UTC)
1823

@@ -30,6 +35,7 @@ jobs:
3035
runtime-version: cu129
3136
container-options: --gpus all
3237
alias: h100
38+
max-runners: 12
3339

3440
run-b200:
3541
if: ${{ github.event.inputs.run_b200 == 'true' || github.event_name == 'schedule' }}
@@ -44,3 +50,19 @@ jobs:
4450
runtime-version: cu129
4551
container-options: --gpus all
4652
alias: b200
53+
max-runners: 12
54+
55+
run-mi325x:
56+
if: ${{ github.event.inputs.run_mi325x == 'true' || github.event_name == 'schedule' }}
57+
uses: ./.github/workflows/benchmark.yml
58+
permissions:
59+
id-token: write
60+
contents: read
61+
with:
62+
runner: linux.rocm.gpu.gfx942.2
63+
python-version: "3.12"
64+
image: rocm/dev-ubuntu-24.04:6.2.4
65+
runtime-version: rocm6.4
66+
container-options: --device=/dev/kfd --device=/dev/dri
67+
alias: mi325x
68+
max-runners: 6

0 commit comments

Comments
 (0)