@@ -158,14 +158,17 @@ jobs:
158
158
cuda-version :
159
159
# Note: this is for test-time only.
160
160
- " 11.8.0"
161
+ local-ctk :
162
+ - 1 # use mini CTK
163
+ - 0 # use CTK wheels
161
164
runner :
162
165
- default
163
166
include :
164
167
- host-platform : linux-64
165
168
python-version : " 3.12"
166
169
cuda-version : " 11.8.0"
167
170
runner : H100
168
- name : Test (${{ matrix.host-platform }}, Python ${{ matrix.python-version }}, CUDA ${{ matrix.cuda-version }}, Runner ${{ matrix.runner }})
171
+ name : Test (${{ matrix.host-platform }}, Python ${{ matrix.python-version }}, CUDA ${{ matrix.cuda-version }}, Runner ${{ matrix.runner }}, ${{ (matrix.local-ctk == '1' && 'local CTK') || 'CTK wheels' }} )
169
172
# The build stage could fail but we want the CI to keep moving.
170
173
if : ${{ github.repository_owner == 'nvidia' && always() }}
171
174
permissions :
@@ -239,6 +242,7 @@ jobs:
239
242
AGENT_TOOLSDIRECTORY : " /opt/hostedtoolcache"
240
243
241
244
- name : Set up mini CTK
245
+ if : ${{ matrix.local-ctk == '1' }}
242
246
uses : ./.github/actions/fetch_ctk
243
247
continue-on-error : false
244
248
with :
@@ -249,22 +253,30 @@ jobs:
249
253
if : ${{ env.SKIP_CUDA_BINDINGS_TEST == '0' }}
250
254
shell : bash --noprofile --norc -xeuo pipefail {0}
251
255
run : |
252
- ls $CUDA_PATH
253
-
254
256
pushd "${CUDA_BINDINGS_ARTIFACTS_DIR}"
255
257
pip install *.whl
258
+ if [[ "${{ matrix.local-ctk }}" == 1 ]]; then
259
+ ls $CUDA_PATH
260
+ pip install *.whl
261
+ else
262
+ pip install $(ls *.whl)[all]
263
+ fi
256
264
popd
257
265
258
266
pushd ./cuda_bindings
259
267
pip install -r requirements.txt
260
268
pytest -rxXs tests/
261
- if [[ "${{ matrix.host-platform }}" == linux* ]]; then
262
- # cython tests require gcc
263
- apt install -y build-essential
264
- bash tests_cython/build_tests.sh
265
- elif [[ "${{ matrix.host-platform }}" == win* ]]; then
266
- # TODO: enable this once win-64 runners are up
267
- exit 1
268
- fi
269
- pytest -rxXs tests_cython
269
+ # It is a bit convoluted to run the Cython tests against CTK wheels,
270
+ # so let's just skip them.
271
+ if [[ "${{ matrix.local-ctk }}" == 1 ]]; then
272
+ if [[ "${{ matrix.host-platform }}" == linux* ]]; then
273
+ # cython tests require gcc
274
+ apt install -y build-essential
275
+ bash tests_cython/build_tests.sh
276
+ elif [[ "${{ matrix.host-platform }}" == win* ]]; then
277
+ # TODO: enable this once win-64 runners are up
278
+ exit 1
279
+ fi
280
+ pytest -rxXs tests_cython
281
+ fi
270
282
popd
0 commit comments