-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (50 loc) · 1.57 KB
/
kernel-bench.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Triton Kernel Benchmarking
on:
pull_request:
workflow_dispatch:
schedule:
# Runs at 12:00 PM UTC, which is 5:00 AM PST
- cron: '0 12 * * *'
concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.sha }}
cancel-in-progress: true
jobs:
check-changes:
runs-on: ubuntu-latest
outputs:
run_benchmarks: ${{ steps.filter.outputs.kernels }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
kernels:
- 'kernels/**'
kernel-bench:
needs: check-changes
if: ${{ needs.check-changes.outputs.run_benchmarks == 'true' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
runs-on: amdgpu-mi250-x86-64
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Setup Triton Python Venv
run: |
python3.11 -m venv triton_bench
source triton_bench/bin/activate
pip install --upgrade pip
pip install --pre pytorch-triton-rocm torch --index-url https://download.pytorch.org/whl/nightly/rocm6.2
pip install -r requirements.txt
- name: Run Kernel Benchmarking
run: |
source triton_bench/bin/activate
pip freeze
pytest -s kernels
- uses: actions/upload-artifact@master
with:
name: perf-artifacts
path: ./perf-artifacts/**/*.csv