2222 nruns :
2323 type : number
2424 default : 1
25- # When true, cuda.bindings tests (and the Cython tests that depend on
26- # them) are skipped even when CTK majors match. Callers set this based
27- # on the output of the detect-changes job in ci.yml so PRs that only
28- # touch unrelated modules avoid the expensive bindings test suite.
29- skip-bindings-test :
25+ test-pathfinder :
3026 type : boolean
31- default : false
27+ default : true
28+ test-bindings :
29+ type : boolean
30+ default : true
31+ test-core :
32+ type : boolean
33+ default : true
34+ test-python :
35+ type : boolean
36+ default : true
3237 run-id :
3338 description : >
3439 Workflow run ID to download artifacts from.
@@ -159,7 +164,7 @@ jobs:
159164 LOCAL_CTK : ${{ matrix.LOCAL_CTK }}
160165 PY_VER : ${{ matrix.PY_VER }}
161166 SHA : ${{ inputs.sha || github.sha }}
162- SKIP_BINDINGS_TEST_OVERRIDE : ${{ inputs.skip -bindings-test && '1' || '0' }}
167+ SKIP_BINDINGS_TEST_OVERRIDE : ${{ ! inputs.test -bindings && '1' || '0' }}
163168 run : ./ci/tools/env-vars test
164169
165170 - name : Apply extra matrix environment variables
@@ -169,6 +174,7 @@ jobs:
169174 run : echo "$MATRIX_ENV" | jq -r 'to_entries[] | "\(.key)=\(.value)"' >> "$GITHUB_ENV"
170175
171176 - name : Download cuda-pathfinder build artifacts
177+ if : ${{ inputs.test-pathfinder || inputs.test-bindings || inputs.test-core || inputs.test-python }}
172178 uses : actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
173179 with :
174180 name : cuda-pathfinder-wheel
@@ -177,7 +183,7 @@ jobs:
177183 github-token : ${{ secrets.GITHUB_TOKEN }}
178184
179185 - name : Download cuda-python build artifacts
180- if : ${{ env.BINDINGS_SOURCE == 'main' }}
186+ if : ${{ inputs.test-python && env.BINDINGS_SOURCE == 'main' }}
181187 uses : actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
182188 with :
183189 name : cuda-python-wheel
@@ -186,7 +192,8 @@ jobs:
186192 github-token : ${{ secrets.GITHUB_TOKEN }}
187193
188194 - name : Download cuda.bindings build artifacts
189- if : ${{ env.BINDINGS_SOURCE == 'main' }}
195+ if : ${{ (inputs.test-bindings || inputs.test-core || inputs.test-python) &&
196+ env.BINDINGS_SOURCE == 'main' }}
190197 uses : actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
191198 with :
192199 name : ${{ env.CUDA_BINDINGS_ARTIFACT_NAME }}
@@ -195,7 +202,8 @@ jobs:
195202 github-token : ${{ secrets.GITHUB_TOKEN }}
196203
197204 - name : Download cuda-python & cuda.bindings build artifacts from the prior branch
198- if : ${{ env.BINDINGS_SOURCE == 'backport' }}
205+ if : ${{ (inputs.test-bindings || inputs.test-core || inputs.test-python) &&
206+ env.BINDINGS_SOURCE == 'backport' }}
199207 env :
200208 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
201209 run : |
@@ -220,25 +228,28 @@ jobs:
220228 mv $OLD_BASENAME/*.whl "${{ env.CUDA_BINDINGS_ARTIFACTS_DIR }}"/
221229 rmdir $OLD_BASENAME
222230
223- gh run download $LATEST_PRIOR_RUN_ID -p cuda-python-wheel -R NVIDIA/cuda-python
224- ls -al cuda-python-wheel
225- mv cuda-python-wheel/*.whl .
226- rmdir cuda-python-wheel
231+ if ${{ inputs.test-python }}; then
232+ gh run download $LATEST_PRIOR_RUN_ID -p cuda-python-wheel -R NVIDIA/cuda-python
233+ ls -al cuda-python-wheel
234+ mv cuda-python-wheel/*.whl .
235+ rmdir cuda-python-wheel
236+ fi
227237
228238 - name : Display structure of downloaded cuda-python artifacts
229- if : ${{ env.BINDINGS_SOURCE != 'published' }}
239+ if : ${{ inputs.test-python && env.BINDINGS_SOURCE != 'published' }}
230240 run : |
231241 pwd
232242 ls -lah cuda_python*.whl cuda_pathfinder/
233243
234244 - name : Display structure of downloaded cuda.bindings artifacts
235- if : ${{ env.BINDINGS_SOURCE != 'published' }}
245+ if : ${{ (inputs.test-bindings || inputs.test-core || inputs.test-python) &&
246+ env.BINDINGS_SOURCE != 'published' }}
236247 run : |
237248 pwd
238249 ls -lahR $CUDA_BINDINGS_ARTIFACTS_DIR
239250
240251 - name : Download cuda.bindings Cython tests
241- if : ${{ env.SKIP_CYTHON_TEST == '0' }}
252+ if : ${{ inputs.test-bindings && env.SKIP_CYTHON_TEST == '0' }}
242253 uses : actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
243254 with :
244255 name : ${{ env.CUDA_BINDINGS_ARTIFACT_NAME }}-tests
@@ -247,12 +258,13 @@ jobs:
247258 github-token : ${{ secrets.GITHUB_TOKEN }}
248259
249260 - name : Display structure of downloaded cuda.bindings Cython tests
250- if : ${{ env.SKIP_CYTHON_TEST == '0' }}
261+ if : ${{ inputs.test-bindings && env.SKIP_CYTHON_TEST == '0' }}
251262 run : |
252263 pwd
253264 ls -lahR $CUDA_BINDINGS_CYTHON_TESTS_DIR
254265
255266 - name : Download cuda.core build artifacts
267+ if : ${{ inputs.test-core }}
256268 uses : actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
257269 with :
258270 name : ${{ env.CUDA_CORE_ARTIFACT_NAME }}
@@ -261,12 +273,13 @@ jobs:
261273 github-token : ${{ secrets.GITHUB_TOKEN }}
262274
263275 - name : Display structure of downloaded cuda.core build artifacts
276+ if : ${{ inputs.test-core }}
264277 run : |
265278 pwd
266279 ls -lahR $CUDA_CORE_ARTIFACTS_DIR
267280
268281 - name : Download cuda.core Cython tests
269- if : ${{ env.SKIP_CYTHON_TEST == '0' }}
282+ if : ${{ inputs.test-core && env.SKIP_CYTHON_TEST == '0' }}
270283 uses : actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
271284 with :
272285 name : ${{ env.CUDA_CORE_ARTIFACT_NAME }}-tests
@@ -275,12 +288,13 @@ jobs:
275288 github-token : ${{ secrets.GITHUB_TOKEN }}
276289
277290 - name : Display structure of downloaded cuda.core Cython tests
278- if : ${{ env.SKIP_CYTHON_TEST == '0' }}
291+ if : ${{ inputs.test-core && env.SKIP_CYTHON_TEST == '0' }}
279292 run : |
280293 pwd
281294 ls -lahR $CUDA_CORE_CYTHON_TESTS_DIR
282295
283296 - name : Download cuda.core test binaries
297+ if : ${{ inputs.test-core }}
284298 uses : actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
285299 with :
286300 name : ${{ env.CUDA_CORE_ARTIFACT_NAME }}-test-binaries
@@ -289,6 +303,7 @@ jobs:
289303 github-token : ${{ secrets.GITHUB_TOKEN }}
290304
291305 - name : Display structure of downloaded cuda.core test binaries
306+ if : ${{ inputs.test-core }}
292307 run : |
293308 pwd
294309 ls -lahR $CUDA_CORE_TEST_BINARIES_DIR
@@ -316,18 +331,18 @@ jobs:
316331
317332 # TODO: remove the numpy wheel steps once 3.15 is officially supported
318333 - name : Download numpy wheel (pre-release Python)
319- if : ${{ startsWith(matrix.PY_VER, '3.15') }}
334+ if : ${{ (inputs.test-bindings || inputs.test-core) && startsWith(matrix.PY_VER, '3.15') }}
320335 uses : actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
321336 with :
322337 name : numpy-python${{ env.PYTHON_VERSION_FORMATTED }}-${{ inputs.host-platform }}
323338 path : numpy-wheel
324339
325340 - name : Install numpy wheel (pre-release Python)
326- if : ${{ startsWith(matrix.PY_VER, '3.15') }}
341+ if : ${{ (inputs.test-bindings || inputs.test-core) && startsWith(matrix.PY_VER, '3.15') }}
327342 run : pip install numpy-wheel/*.whl
328343
329344 - name : Set up latest cuda_sanitizer_api
330- if : ${{ env.SETUP_SANITIZER == '1' }}
345+ if : ${{ (inputs.test-bindings || inputs.test-core) && env.SETUP_SANITIZER == '1' }}
331346 uses : ./.github/actions/fetch_ctk
332347 continue-on-error : false
333348 with :
@@ -336,22 +351,23 @@ jobs:
336351 cuda-components : " cuda_sanitizer_api"
337352
338353 - name : Set up compute-sanitizer
354+ if : ${{ inputs.test-bindings || inputs.test-core }}
339355 run : setup-sanitizer
340356
341357 - name : Set up test repetition on nightly runs
342358 run : echo "PYTEST_ADDOPTS=\"--count=${{ inputs.nruns }}\"" >> "$GITHUB_ENV"
343359
344360 # ── Standard test steps (skipped for nightly modes) ──
345361 - name : Run cuda.pathfinder tests with see_what_works
346- if : ${{ inputs.test-mode == 'standard' }}
362+ if : ${{ inputs.test-mode == 'standard' && inputs.test-pathfinder }}
347363 env :
348364 CUDA_PATHFINDER_TEST_LOAD_NVIDIA_DYNAMIC_LIB_STRICTNESS : see_what_works
349365 CUDA_PATHFINDER_TEST_FIND_NVIDIA_HEADERS_STRICTNESS : see_what_works
350366 CUDA_PATHFINDER_TEST_FIND_NVIDIA_BITCODE_LIB_STRICTNESS : see_what_works
351367 run : run-tests pathfinder
352368
353369 - name : Run cuda.bindings tests
354- if : ${{ inputs.test-mode == 'standard' && env.SKIP_CUDA_BINDINGS_TEST == '0' }}
370+ if : ${{ inputs.test-mode == 'standard' && inputs.test-bindings && env.SKIP_CUDA_BINDINGS_TEST == '0' }}
355371 env :
356372 CUDA_VER : ${{ matrix.CUDA_VER }}
357373 LOCAL_CTK : ${{ matrix.LOCAL_CTK }}
@@ -361,33 +377,43 @@ jobs:
361377 run : run-tests bindings
362378
363379 - name : Run cuda.bindings benchmarks (smoke test)
364- if : ${{ inputs.test-mode == 'standard' && env.SKIP_CUDA_BINDINGS_TEST == '0' }}
380+ if : ${{ inputs.test-mode == 'standard' && inputs.test-bindings && env.SKIP_CUDA_BINDINGS_TEST == '0' }}
365381 run : |
366382 pip install pyperf
367383 pushd benchmarks/cuda_bindings
368384 python run_pyperf.py --debug-single-value
369385 popd
370386
371387 - name : Run cuda.core tests
372- if : ${{ inputs.test-mode == 'standard' }}
388+ if : ${{ inputs.test-mode == 'standard' && inputs.test-core }}
373389 env :
374390 CUDA_VER : ${{ matrix.CUDA_VER }}
375391 LOCAL_CTK : ${{ matrix.LOCAL_CTK }}
376392 run : run-tests core
377393
378394 - name : Ensure cuda-python installable
379- if : ${{ inputs.test-mode == 'standard' && env.BINDINGS_SOURCE == 'main' }}
395+ if : ${{ inputs.test-mode == 'standard' && inputs.test-python && env.BINDINGS_SOURCE == 'main' }}
380396 run : |
381- # Subpackages are already installed from CI artifacts; --no-deps keeps
382- # tag-release cuda-core wheels from being replaced by PyPI pins.
397+ # Package suites install their own dependencies. A metapackage-only
398+ # run has no preceding suite, so resolve its exact cuda-bindings pin
399+ # from this run while allowing its released cuda-core pin from PyPI.
400+ if ${{ inputs.test-bindings || inputs.test-core }}; then
401+ dependency_args=(--no-deps)
402+ else
403+ dependency_args=(
404+ --find-links ./cuda_pathfinder
405+ --find-links "${CUDA_BINDINGS_ARTIFACTS_DIR}"
406+ )
407+ fi
408+ wheel=$(ls cuda_python*.whl)
383409 if [[ "${{ matrix.LOCAL_CTK }}" == 1 ]]; then
384- pip install --only-binary=:all: --no-deps cuda_python*.whl
410+ pip install --only-binary=:all: "${dependency_args[@]}" "${wheel}"
385411 else
386- pip install --only-binary=:all: --no-deps $(ls cuda_python*.whl) [all]
412+ pip install --only-binary=:all: "${dependency_args[@]}" "${wheel} [all]"
387413 fi
388414
389415 - name : Install cuda.pathfinder extra wheels for testing
390- if : ${{ inputs.test-mode == 'standard' }}
416+ if : ${{ inputs.test-mode == 'standard' && inputs.test-pathfinder }}
391417 run : |
392418 set -euo pipefail
393419 pushd cuda_pathfinder
@@ -396,7 +422,7 @@ jobs:
396422 popd
397423
398424 - name : Run cuda.pathfinder tests with all_must_work
399- if : ${{ inputs.test-mode == 'standard' }}
425+ if : ${{ inputs.test-mode == 'standard' && inputs.test-pathfinder }}
400426 env :
401427 CUDA_PATHFINDER_TEST_LOAD_NVIDIA_DYNAMIC_LIB_STRICTNESS : all_must_work
402428 CUDA_PATHFINDER_TEST_FIND_NVIDIA_HEADERS_STRICTNESS : all_must_work
0 commit comments