From 07301575a46339fb910932b80c63df0a2dd50b3d Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Wed, 15 Apr 2026 15:43:48 -0700 Subject: [PATCH 1/2] test: pin core toolkit installs to the requested CTK minor Keep the core test environment aligned with the matrix-selected CUDA toolkit so pip does not resolve a newer runtime and invalidate the job coverage. Made-with: Cursor --- ci/tools/run-tests | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ci/tools/run-tests b/ci/tools/run-tests index 891a20905c9..0890ca9ce91 100755 --- a/ci/tools/run-tests +++ b/ci/tools/run-tests @@ -74,14 +74,14 @@ elif [[ "${test_module}" == "core" ]]; then pushd ./cuda_core CUDA_VER_MINOR="$(cut -d '.' -f 1-2 <<< "${CUDA_VER}")" + # Constrain cuda-toolkit to the requested CTK version to avoid + # pip pulling in a newer nvidia-cuda-runtime that conflicts with it. if [[ "${LOCAL_CTK}" == 1 ]]; then # We already installed cuda-bindings, and all CTK components exist locally, # so just install the test dependencies. - # Constrain cuda-toolkit to match the local CTK version to avoid - # pip pulling in a newer nvidia-cuda-runtime that conflicts with it. pip install "${CUDA_CORE_ARTIFACTS_DIR}"/*.whl --group "test-cu${TEST_CUDA_MAJOR}${FREE_THREADING}" "cuda-toolkit==${CUDA_VER_MINOR}.*" else - pip install $(ls "${CUDA_CORE_ARTIFACTS_DIR}"/*.whl)["cu${TEST_CUDA_MAJOR}"] --group "test-cu${TEST_CUDA_MAJOR}${FREE_THREADING}" + pip install $(ls "${CUDA_CORE_ARTIFACTS_DIR}"/*.whl)["cu${TEST_CUDA_MAJOR}"] --group "test-cu${TEST_CUDA_MAJOR}${FREE_THREADING}" "cuda-toolkit==${CUDA_VER_MINOR}.*" fi echo "Running core tests" ${SANITIZER_CMD} pytest -rxXs -v --durations=0 --randomly-dont-reorganize tests/ From 117e3db1627c4d6479d8bc796148f6795c8ced9e Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Wed, 15 Apr 2026 15:58:22 -0700 Subject: [PATCH 2/2] test: simplify core wheel install selection Centralize the core wheel target selection so both install modes share one pip invocation while preserving when the published cuda.bindings extra is requested. Made-with: Cursor --- ci/tools/run-tests | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/ci/tools/run-tests b/ci/tools/run-tests index 0890ca9ce91..d42634a7073 100755 --- a/ci/tools/run-tests +++ b/ci/tools/run-tests @@ -74,15 +74,15 @@ elif [[ "${test_module}" == "core" ]]; then pushd ./cuda_core CUDA_VER_MINOR="$(cut -d '.' -f 1-2 <<< "${CUDA_VER}")" + # Start from the built wheel path, then add the published cuda.bindings extra + # when this job is resolving against wheel-installed CTK packages. + WHL_EXTRA=("${CUDA_CORE_ARTIFACTS_DIR}"/*.whl) + if [[ "${LOCAL_CTK}" != 1 ]]; then + WHL_EXTRA=("${WHL_EXTRA[0]}[cu${TEST_CUDA_MAJOR}]") + fi # Constrain cuda-toolkit to the requested CTK version to avoid # pip pulling in a newer nvidia-cuda-runtime that conflicts with it. - if [[ "${LOCAL_CTK}" == 1 ]]; then - # We already installed cuda-bindings, and all CTK components exist locally, - # so just install the test dependencies. - pip install "${CUDA_CORE_ARTIFACTS_DIR}"/*.whl --group "test-cu${TEST_CUDA_MAJOR}${FREE_THREADING}" "cuda-toolkit==${CUDA_VER_MINOR}.*" - else - pip install $(ls "${CUDA_CORE_ARTIFACTS_DIR}"/*.whl)["cu${TEST_CUDA_MAJOR}"] --group "test-cu${TEST_CUDA_MAJOR}${FREE_THREADING}" "cuda-toolkit==${CUDA_VER_MINOR}.*" - fi + pip install "${WHL_EXTRA[@]}" --group "test-cu${TEST_CUDA_MAJOR}${FREE_THREADING}" "cuda-toolkit==${CUDA_VER_MINOR}.*" echo "Running core tests" ${SANITIZER_CMD} pytest -rxXs -v --durations=0 --randomly-dont-reorganize tests/ # Currently our CI always installs the latest bindings (from either major version).