-
Notifications
You must be signed in to change notification settings - Fork 3
96 lines (80 loc) · 2.66 KB
/
test_gpu.yml
File metadata and controls
96 lines (80 loc) · 2.66 KB
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
name: Test-GPU
on:
push:
branches:
- "main"
pull_request:
# To limit Actions,
# don't automatically run on synchronize, but allow manual triggering
types: [opened, reopened, ready_for_review]
paths:
- "**"
- "!**.md"
- "!**.rst"
- "!docs/**"
- "!.bumpversion.toml"
- "!.gitignore"
- "!.github/workflows/*.yml"
- ".github/workflows/test_gpu.yml"
workflow_dispatch: # manual button click
defaults:
run:
shell: bash
jobs:
test-gpu:
strategy:
matrix:
python-version: ["3.11", "3.13"]
os: ["linux-x64-nvidia-gpu-t4"]
runs-on: ${{ matrix.os }}
timeout-minutes: 10
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Cache downloaded data
uses: actions/cache@v4
with:
path: ~/.cache/mach
# Key based on known file hashes from cached_download() calls
key: mach-data-cache-v1-${{ runner.os }}-c93af0781daeebf771e53a42a629d4f311407410166ef2f1d227e9d2a1b8c641-c349dc1d677c561434fd0e4a74142c4a0a44b7e6ae0a42d446c078a528ef58c1
- name: Setup CUDA environment
uses: ./.github/actions/setup-cuda-python-env
with:
python-version: ${{ matrix.python-version }}
- name: Run CUDA unit tests
run: make test
benchmark:
strategy:
matrix:
python-version: ["3.11"]
os: ["linux-x64-nvidia-gpu-t4"]
runs-on: ${{ matrix.os }}
timeout-minutes: 10
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Cache downloaded data
uses: actions/cache@v4
with:
path: ~/.cache/mach
# Key based on known file hashes from cached_download() calls
key: mach-data-cache-v1-${{ runner.os }}-c93af0781daeebf771e53a42a629d4f311407410166ef2f1d227e9d2a1b8c641-c349dc1d677c561434fd0e4a74142c4a0a44b7e6ae0a42d446c078a528ef58c1
- name: Setup CUDA environment
uses: ./.github/actions/setup-cuda-python-env
with:
python-version: ${{ matrix.python-version }}
- name: Run CUDA benchmark
run: make benchmark
- name: Plot benchmark (runtime)
run:
uv run --group compare tests/plot_benchmark.py --output .benchmarks/benchmark.png
- name: Plot benchmark (throughput)
run:
uv run --group compare tests/plot_benchmark.py --points-per-second --output .benchmarks/benchmark_pps.png
- name: Upload benchmark results
uses: actions/upload-artifact@v4
with:
name: benchmark-results
include-hidden-files: true
path: .benchmarks
retention-days: 7