2020
2121test_module=${1}
2222
23- # Install dependency groups first (uv sync manages the venv and removes
24- # packages it didn't install), then install pre-built wheels after.
23+ # Unconditionally install pathfinder wheel
24+ # (it is a direct dependency of bindings, and a transitive dependency of core)
25+ pushd ./cuda_pathfinder
26+ echo " Installing pathfinder wheel"
27+ uv pip install ./* .whl
28+ uv sync --frozen --inexact --package cuda-pathfinder --only-group test --no-install-project
29+ popd
2530
2631if [[ " ${test_module} " == " pathfinder" ]]; then
2732 pushd ./cuda_pathfinder
28- echo " Installing pathfinder test deps and wheel"
29- uv sync --frozen --package cuda-pathfinder --only-group test --no-install-project
30- uv pip install ./* .whl
3133 echo " Running pathfinder tests with " \
3234 " LD:${CUDA_PATHFINDER_TEST_LOAD_NVIDIA_DYNAMIC_LIB_STRICTNESS} " \
3335 " FH:${CUDA_PATHFINDER_TEST_FIND_NVIDIA_HEADERS_STRICTNESS} "
@@ -37,51 +39,46 @@ if [[ "${test_module}" == "pathfinder" ]]; then
3739 echo " Number of \" INFO test_\" lines: $line_count "
3840 popd
3941elif [[ " ${test_module} " == " bindings" ]]; then
40- echo " Installing bindings test deps and wheels "
42+ echo " Installing bindings wheel "
4143 pushd ./cuda_bindings
42- uv sync --frozen --package cuda-pathfinder --only-group test --no-install-project
43- uv sync --frozen --package cuda-bindings --only-group test --no-install-project
44- uv pip install ./cuda_pathfinder/* .whl
4544 if [[ " ${LOCAL_CTK} " == 1 ]]; then
4645 uv pip install " ${CUDA_BINDINGS_ARTIFACTS_DIR} " /* .whl
4746 else
4847 uv pip install $( ls " ${CUDA_BINDINGS_ARTIFACTS_DIR} " /* .whl) [all]
4948 fi
49+ uv sync --frozen --inexact --package cuda-bindings --only-group test --no-install-project
5050 echo " Running bindings tests"
5151 ${SANITIZER_CMD} pytest -rxXs -v --durations=0 tests/
5252 if [[ " ${SKIP_CYTHON_TEST} " == 0 ]]; then
5353 ${SANITIZER_CMD} pytest -rxXs -v --durations=0 tests/cython
5454 fi
5555 popd
5656elif [[ " ${test_module} " == " core" ]]; then
57+ # If build/test majors match: cuda.bindings is installed in the previous step.
58+ # If mismatch: cuda.bindings is installed from the backport branch.
59+ if [[ " ${SKIP_CUDA_BINDINGS_TEST} " == 1 ]]; then
60+ echo " Installing bindings wheel"
61+ if [[ " ${LOCAL_CTK} " == 1 ]]; then
62+ uv pip install " ${CUDA_BINDINGS_ARTIFACTS_DIR} " /* .whl
63+ else
64+ uv pip install $( ls " ${CUDA_BINDINGS_ARTIFACTS_DIR} " /* .whl) [all]
65+ fi
66+ fi
5767 TEST_CUDA_MAJOR=" $( cut -d ' .' -f 1 <<< ${CUDA_VER} ) "
68+ echo " Installing core wheel"
5869
5970 FREE_THREADING=" "
6071 if python -c ' import sys; assert not sys._is_gil_enabled()' 2> /dev/null; then
6172 FREE_THREADING+=" -ft"
6273 fi
6374
64- echo " Installing core test deps and wheels"
6575 pushd ./cuda_core
66- uv sync --frozen --package cuda-pathfinder --only-group test --no-install-project
67- uv sync --frozen --package cuda-bindings --only-group test --no-install-project
68- uv sync --frozen --package cuda-core --only-group " test-cu${TEST_CUDA_MAJOR}${FREE_THREADING} " --no-install-project
69- # Install all wheels after the last sync
70- uv pip install ./cuda_pathfinder/* .whl
71- if [[ " ${SKIP_CUDA_BINDINGS_TEST} " == 1 ]]; then
72- if [[ " ${LOCAL_CTK} " == 1 ]]; then
73- uv pip install " ${CUDA_BINDINGS_ARTIFACTS_DIR} " /* .whl
74- else
75- uv pip install $( ls " ${CUDA_BINDINGS_ARTIFACTS_DIR} " /* .whl) [all]
76- fi
77- else
78- uv pip install " ${CUDA_BINDINGS_ARTIFACTS_DIR} " /* .whl
79- fi
8076 if [[ " ${LOCAL_CTK} " == 1 ]]; then
8177 uv pip install " ${CUDA_CORE_ARTIFACTS_DIR} " /* .whl
8278 else
8379 uv pip install $( ls " ${CUDA_CORE_ARTIFACTS_DIR} " /* .whl) [" cu${TEST_CUDA_MAJOR} " ]
8480 fi
81+ uv sync --frozen --inexact --package cuda-core --only-group " test-cu${TEST_CUDA_MAJOR}${FREE_THREADING} " --no-install-project
8582 echo " Running core tests"
8683 ${SANITIZER_CMD} pytest -rxXs -v --durations=0 tests/
8784 if [[ " ${SKIP_CYTHON_TEST} " == 0 ]]; then
0 commit comments