44
55set -eou pipefail
66
7- RAPIDS_INIT_PIP_REMOVE_NVIDIA_INDEX=" true"
8- export RAPIDS_INIT_PIP_REMOVE_NVIDIA_INDEX
7+ # TODO(jameslamb): revert before merging
8+ git clone --branch generate-pip-constraints \
9+ https://github.com/rapidsai/gha-tools.git \
10+ /tmp/gha-tools
11+
12+ export PATH=" /tmp/gha-tools/tools:${PATH} "
13+
914source rapids-init-pip
1015
1116RAPIDS_PY_CUDA_SUFFIX=" $( rapids-wheel-ctk-name-gen " ${RAPIDS_CUDA_VERSION} " ) "
1217LIBRMM_WHEELHOUSE=$( RAPIDS_PY_WHEEL_NAME=" librmm_${RAPIDS_PY_CUDA_SUFFIX} " rapids-download-wheels-from-github cpp)
1318RMM_WHEELHOUSE=$( rapids-download-from-github " $( rapids-package-name " wheel_python" rmm --stable --cuda " $RAPIDS_CUDA_VERSION " ) " )
1419
1520# generate constraints (possibly pinning to oldest support versions of dependencies)
16- rapids-generate-pip-constraints test_python ./constraints.txt
21+ rapids-generate-pip-constraints test_python " ${PIP_CONSTRAINT} "
1722
1823# notes:
1924#
2025# * echo to expand wildcard before adding `[test]` requires for pip
21- # * need to provide --constraint="${PIP_CONSTRAINT}" because that environment variable is
22- # ignored if any other --constraint are passed via the CLI
26+ # * just providing --constraint="${PIP_CONSTRAINT}" to be explicit, and because
27+ # that environment variable is ignored if any other --constraint are passed via the CLI
2328#
2429PIP_INSTALL_SHARED_ARGS=(
25- --constraint=./constraints.txt
30+ --prefer-binary
2631 --constraint=" ${PIP_CONSTRAINT} "
2732 " $( echo " ${LIBRMM_WHEELHOUSE} " /librmm_" ${RAPIDS_PY_CUDA_SUFFIX} " * .whl) "
2833 " $( echo " ${RMM_WHEELHOUSE} " /rmm_" ${RAPIDS_PY_CUDA_SUFFIX} " * .whl) [test]"
@@ -40,18 +45,18 @@ CUDA_MINOR=$(echo "${RAPIDS_CUDA_VERSION}" | cut -d'.' -f2)
4045echo " ::group::PyTorch Tests"
4146
4247if [ " ${CUDA_MAJOR} " -gt 12 ] || { [ " ${CUDA_MAJOR} " -eq 12 ] && [ " ${CUDA_MINOR} " -ge 8 ]; }; then
43- rapids-logger " Generating PyTorch test requirements"
44- rapids-dependency-file-generator \
45- --output requirements \
46- --file-key test_wheels_pytorch \
47- --matrix " cuda=${RAPIDS_CUDA_VERSION% .* } ;arch=$( arch) ;py=${RAPIDS_PY_VERSION} " \
48- | tee test-pytorch-requirements.txt
48+
49+ # ensure a CUDA variant of 'torch' is used
50+ rapids-logger " Downloading PyTorch CUDA wheels"
51+ TORCH_WHEEL_DIR=" $( mktemp -d) "
52+ ./ci/download-torch-wheels.sh " ${TORCH_WHEEL_DIR} "
4953
5054 rapids-logger " Installing PyTorch test requirements"
5155 rapids-pip-retry install \
5256 -v \
5357 " ${PIP_INSTALL_SHARED_ARGS[@]} " \
54- -r test-pytorch-requirements.txt
58+ -r test-pytorch-requirements.txt \
59+ " ${TORCH_WHEEL_DIR} " /torch-* .whl
5560
5661 timeout 15m python -m pytest -k " torch" ./python/rmm/rmm/tests \
5762 && EXITCODE_PYTORCH=$? || EXITCODE_PYTORCH=$?
@@ -71,7 +76,7 @@ rapids-logger "Generating CuPy test requirements"
7176rapids-dependency-file-generator \
7277 --output requirements \
7378 --file-key test_wheels_cupy \
74- --matrix " cuda=${RAPIDS_CUDA_VERSION% .* } ;arch=$( arch) ;py=${RAPIDS_PY_VERSION} " \
79+ --matrix " cuda=${RAPIDS_CUDA_VERSION% .* } ;arch=$( arch) ;py=${RAPIDS_PY_VERSION} ;use_cuda_wheels=true " \
7580 | tee test-cupy-requirements.txt
7681
7782rapids-logger " Installing CuPy test requirements"
0 commit comments