-
Notifications
You must be signed in to change notification settings - Fork 179
209 lines (201 loc) · 7.49 KB
/
Copy pathcuda.yaml
File metadata and controls
209 lines (201 loc) · 7.49 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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
name: CUDA
# Concurrency control:
# - PRs: new commits on a feature branch will cancel in-progress (outdated) runs.
# - Push to develop: runs queue sequentially, never cancelled.
# - `workflow_dispatch`: groups by branch and queues if run on develop.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/develop' }}
on:
push:
branches: [develop]
pull_request: { }
workflow_dispatch: { }
permissions:
contents: read
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
jobs:
changes:
name: "Detect CUDA changes"
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
pull-requests: read
outputs:
run-cuda-san: ${{ github.event_name != 'pull_request' || steps.filter.outputs.cuda == 'true' }}
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
- uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4
id: filter
if: github.event_name == 'pull_request'
with:
filters: |
cuda:
- "vortex-cuda/**"
- "vortex-python/python/vortex/__init__.py"
- "vortex-python/pyproject.toml"
- "vortex-python/test/test_cuda.py"
- "vortex-python-cuda/**"
- "vortex-test/**"
- "pyproject.toml"
- "uv.lock"
- ".github/workflows/**"
cuda-build-lint:
needs: [changes]
if: >-
always() && github.repository == 'vortex-data/vortex' &&
needs.changes.outputs.run-cuda-san == 'true'
name: "CUDA build & lint"
timeout-minutes: 30
runs-on: runs-on=${{ github.run_id }}/runner=gpu/tag=cuda-build
steps:
- uses: runs-on/action@v2
with:
sccache: s3
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
- uses: ./.github/actions/setup-rust
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: ./.github/actions/check-rebuild
with:
command: >-
cargo build --profile ci --locked --all-features --all-targets
-p vortex-cuda -p vortex-cuda-ffi -p vortex-cub -p vortex-nvcomp
-p gpu-scan-cli -p vortex-test-e2e-cuda -p vortex-python-cuda
- name: Clippy CUDA crates
run: |
cargo clippy --profile ci --locked --all-features --all-targets \
-p vortex-cuda \
-p vortex-cuda-ffi \
-p vortex-cub \
-p vortex-nvcomp \
-p gpu-scan-cli \
-p vortex-test-e2e-cuda \
-p vortex-python-cuda \
-- -D warnings
cuda-test:
needs: [changes]
if: >-
always() && github.repository == 'vortex-data/vortex' &&
needs.changes.outputs.run-cuda-san == 'true'
name: "CUDA tests"
timeout-minutes: 30
runs-on: runs-on=${{ github.run_id }}/runner=gpu/tag=cuda-tests
steps:
- uses: runs-on/action@v2
with:
sccache: s3
- name: Display NVIDIA SMI details
run: |
nvidia-smi
nvidia-smi -L
nvidia-smi -q -d Memory
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
- uses: ./.github/actions/setup-rust
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install uv
uses: spiraldb/actions/.github/actions/setup-uv@a746510eafaa926484c354541cfc49b2ec06cc63 # 0.18.6
with:
sync: false
- name: Install nextest
uses: taiki-e/install-action@9e1e5806d4a4822de933115878265be9aaa786d9 # v2
with:
tool: nextest
- name: Rust Tests
env:
FLAT_LAYOUT_INLINE_ARRAY_NODE: true
run: |
cargo nextest run \
--cargo-profile ci \
--locked \
-p vortex-file \
-p vortex-cuda \
-p vortex-cuda-ffi \
-p vortex-cub \
-p vortex-nvcomp \
-p vortex-test-e2e-cuda \
-p vortex-python-cuda \
--all-features \
--no-fail-fast \
--target x86_64-unknown-linux-gnu \
--verbose
- name: Python CUDA extension checks
env:
MATURIN_PEP517_ARGS: "--profile ci"
run: |
# --all-packages installs the shared dev tooling (basedpyright) from the
# root `dev` group; --extra cuda adds the vortex-data-cuda extension.
uv run --all-packages --extra cuda basedpyright vortex-python vortex-python-cuda
uv run --all-packages --extra cuda pytest --benchmark-disable vortex-python/test/test_cuda.py vortex-python-cuda/test
cuda-test-sanitizer:
needs: [changes]
if: >-
always() && github.repository == 'vortex-data/vortex' &&
needs.changes.outputs.run-cuda-san == 'true'
name: "CUDA tests (${{ matrix.sanitizer }})"
timeout-minutes: 30
runs-on: runs-on=${{ github.run_id }}/runner=gpu/tag=cuda-test-sanitizer
strategy:
fail-fast: false
matrix:
include:
- sanitizer: memcheck
runner_flags: "--tool memcheck --leak-check=full --error-exitcode 1"
# TODO(joe): try to re-enable racecheck, it is hanging in CI.
# - sanitizer: racecheck
# runner_flags: "--tool racecheck --error-exitcode 1"
- sanitizer: synccheck
runner_flags: "--tool synccheck --error-exitcode 1"
- sanitizer: initcheck
runner_flags: "--tool initcheck --error-exitcode 1"
steps:
- uses: runs-on/action@v2
with:
sccache: s3
- name: Display NVIDIA SMI details
run: |
nvidia-smi
nvidia-smi -L
nvidia-smi -q -d Memory
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
- uses: ./.github/actions/setup-rust
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Build tests
run: cargo test --profile ci --locked -p vortex-cuda --all-features --target x86_64-unknown-linux-gnu --no-run
- name: "CUDA - ${{ matrix.sanitizer }}"
env:
CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUNNER: "compute-sanitizer ${{ matrix.runner_flags }}"
run: cargo test --profile ci --locked -p vortex-cuda --all-features --target x86_64-unknown-linux-gnu
cuda-test-cudf:
needs: [changes]
if: >-
always() && github.repository == 'vortex-data/vortex' &&
needs.changes.outputs.run-cuda-san == 'true'
name: "CUDA tests (cudf)"
timeout-minutes: 30
runs-on: runs-on=${{ github.run_id }}/runner=gpu/tag=cuda-test-cudf
steps:
- uses: runs-on/action@v2
with:
sccache: s3
- name: Display NVIDIA SMI details
run: |
nvidia-smi
nvidia-smi -L
nvidia-smi -q -d Memory
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
- uses: ./.github/actions/setup-rust
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Build cudf test library
run: cargo build --profile ci --locked -p vortex-test-e2e-cuda --target x86_64-unknown-linux-gnu
- name: Download and run cudf-test-harness
run: |
curl -fsSL https://github.com/vortex-data/cudf-test-harness/releases/latest/download/cudf-test-harness-x86_64.tar.gz | tar -xz
$GITHUB_WORKSPACE/target/x86_64-unknown-linux-gnu/ci/cudf_harness_runner \
./cudf-test-harness-x86_64/cudf-test-harness \
$GITHUB_WORKSPACE/target/x86_64-unknown-linux-gnu/ci/libvortex_test_e2e_cuda.so