forked from Dao-AILab/quack
-
Notifications
You must be signed in to change notification settings - Fork 0
88 lines (83 loc) · 2.64 KB
/
_test.yml
File metadata and controls
88 lines (83 loc) · 2.64 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
name: _test (reusable)
on:
workflow_call:
inputs:
ref:
description: Git ref to check out (defaults to the calling event's default).
type: string
required: false
default: ''
environment:
description: GitHub environment to run the test job in (e.g. "gpu-ci").
type: string
required: false
default: ''
env:
# Bump these when pushing a new image; old SIFs are auto-pruned on the next CI run.
IMAGE_CU129: tridao/quack-kernels:cu12.9-26.05.16
IMAGE_CU132: tridao/quack-kernels:cu13.2-26.05.16
jobs:
lint:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
with:
ref: ${{ inputs.ref }}
- name: Install ruff
run: pip install ruff
- name: Ruff check
run: ruff check quack/ tests/
- name: Ruff format
run: ruff format --check quack/ tests/
changes:
runs-on: ubuntu-24.04
outputs:
code: ${{ steps.filter.outputs.code }}
steps:
# paths-filter needs git history on push events; for PRs it uses the API.
- if: github.event_name == 'push'
uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
code:
- 'quack/**'
- 'tests/**'
- '.github/**'
- 'pyproject.toml'
test:
needs: changes
if: >
needs.changes.outputs.code == 'true' &&
(github.event_name == 'push' ||
(github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) ||
github.event_name == 'pull_request_target')
environment: ${{ inputs.environment }}
strategy:
fail-fast: false
matrix:
include:
# The cu129 image with torch 2.12 no longer works with B300 (bc torch is installed
# with cu12.6).
- { gpu: h100, cuda: cu129 }
- { gpu: h100, cuda: cu132 }
- { gpu: b300, cuda: cu132 }
- { gpu: h100, cuda: cu129, arch: '120' }
- { gpu: h100, cuda: cu132, arch: '120' }
runs-on: [self-hosted, '${{ matrix.gpu }}']
name: test (${{ matrix.gpu }}${{ matrix.arch && format(' / sm{0}', matrix.arch) || '' }} / ${{ matrix.cuda }})
timeout-minutes: 30
steps:
- uses: actions/checkout@v6
with:
ref: ${{ inputs.ref }}
- uses: ./.github/actions/gpu-test
with:
cuda: ${{ matrix.cuda }}
gpu: ${{ matrix.gpu }}
image_cu129: ${{ env.IMAGE_CU129 }}
image_cu132: ${{ env.IMAGE_CU132 }}
arch: ${{ matrix.arch }}