Skip to content

Commit a2ccf28

Browse files
cpcloudcursoragent
andcommitted
ci: constrain cuda-toolkit to match local CTK version
When LOCAL_CTK=1, the pip dependency group test-cu13 pulls in cuda-toolkit[cudart]==13.* which resolves to the latest 13.x pip wheel. This can install nvidia-cuda-runtime from a newer minor version than the local CTK, causing version mismatches (e.g., nvjitlink 13.0 rejecting a 13.1 libcudadevrt.a). Constrain cuda-toolkit to CUDA_VER's major.minor so pip installs a version consistent with the local CTK. Closes #1691 Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 1303028 commit a2ccf28

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

ci/tools/run-tests

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,13 @@ elif [[ "${test_module}" == "core" ]]; then
7373
fi
7474

7575
pushd ./cuda_core
76+
CUDA_VER_MINOR="$(cut -d '.' -f 1-2 <<< "${CUDA_VER}")"
7677
if [[ "${LOCAL_CTK}" == 1 ]]; then
7778
# We already installed cuda-bindings, and all CTK components exist locally,
7879
# so just install the test dependencies.
79-
pip install "${CUDA_CORE_ARTIFACTS_DIR}"/*.whl --group "test-cu${TEST_CUDA_MAJOR}${FREE_THREADING}"
80+
# Constrain cuda-toolkit to match the local CTK version to avoid
81+
# pip pulling in a newer nvidia-cuda-runtime that conflicts with it.
82+
pip install "${CUDA_CORE_ARTIFACTS_DIR}"/*.whl --group "test-cu${TEST_CUDA_MAJOR}${FREE_THREADING}" "cuda-toolkit==${CUDA_VER_MINOR}.*"
8083
else
8184
pip install $(ls "${CUDA_CORE_ARTIFACTS_DIR}"/*.whl)["cu${TEST_CUDA_MAJOR}"] --group "test-cu${TEST_CUDA_MAJOR}${FREE_THREADING}"
8285
fi

0 commit comments

Comments
 (0)