Unverified Commit d0d7058a authored by Andrey Talman's avatar Andrey Talman Committed by GitHub
Browse files

Replacing cudatoolkit by cuda for 11.6 (#5996)

parent 12bb8873
...@@ -21,7 +21,12 @@ else ...@@ -21,7 +21,12 @@ else
fi fi
echo "Using CUDA $CUDA_VERSION as determined by CU_VERSION" echo "Using CUDA $CUDA_VERSION as determined by CU_VERSION"
version="$(python -c "print('.'.join(\"${CUDA_VERSION}\".split('.')[:2]))")" version="$(python -c "print('.'.join(\"${CUDA_VERSION}\".split('.')[:2]))")"
cudatoolkit="nvidia::cudatoolkit=${version}"
cuda_toolkit_pckg="cudatoolkit"
if [[ "$CU_VERSION" == cu116 ]]; then
cuda_toolkit_pckg="cuda"
fi
cudatoolkit="nvidia::${cuda_toolkit_pckg}=${version}"
fi fi
case "$(uname -s)" in case "$(uname -s)" in
......
...@@ -22,9 +22,15 @@ else ...@@ -22,9 +22,15 @@ else
elif [[ ${#CU_VERSION} -eq 5 ]]; then elif [[ ${#CU_VERSION} -eq 5 ]]; then
CUDA_VERSION="${CU_VERSION:2:2}.${CU_VERSION:4:1}" CUDA_VERSION="${CU_VERSION:2:2}.${CU_VERSION:4:1}"
fi fi
cuda_toolkit_pckg="cudatoolkit"
if [[ "$CU_VERSION" == cu116 ]]; then
cuda_toolkit_pckg="cuda"
fi
echo "Using CUDA $CUDA_VERSION as determined by CU_VERSION" echo "Using CUDA $CUDA_VERSION as determined by CU_VERSION"
version="$(python -c "print('.'.join(\"${CUDA_VERSION}\".split('.')[:2]))")" version="$(python -c "print('.'.join(\"${CUDA_VERSION}\".split('.')[:2]))")"
cudatoolkit="cudatoolkit=${version}" cudatoolkit="${cuda_toolkit_pckg}=${version}"
fi fi
printf "Installing PyTorch with %s\n" "${cudatoolkit}" printf "Installing PyTorch with %s\n" "${cudatoolkit}"
......
...@@ -11,11 +11,6 @@ setup_conda_pytorch_constraint ...@@ -11,11 +11,6 @@ setup_conda_pytorch_constraint
setup_conda_cudatoolkit_constraint setup_conda_cudatoolkit_constraint
setup_visual_studio_constraint setup_visual_studio_constraint
setup_junit_results_folder setup_junit_results_folder
# nvidia channel included for cudatoolkit >= 11 however for 11.5 and 11.6 we use conda-forge
export CUDATOOLKIT_CHANNEL="nvidia" export CUDATOOLKIT_CHANNEL="nvidia"
if [[ "$CU_VERSION" == cu116 ]]; then
export CUDATOOLKIT_CHANNEL="conda-forge"
fi
conda build -c $CUDATOOLKIT_CHANNEL -c defaults $CONDA_CHANNEL_FLAGS --no-anaconda-upload --python "$PYTHON_VERSION" packaging/torchvision conda build -c $CUDATOOLKIT_CHANNEL -c defaults $CONDA_CHANNEL_FLAGS --no-anaconda-upload --python "$PYTHON_VERSION" packaging/torchvision
...@@ -257,7 +257,7 @@ setup_conda_cudatoolkit_constraint() { ...@@ -257,7 +257,7 @@ setup_conda_cudatoolkit_constraint() {
else else
case "$CU_VERSION" in case "$CU_VERSION" in
cu116) cu116)
export CONDA_CUDATOOLKIT_CONSTRAINT="- cudatoolkit >=11.6,<11.7 # [not osx]" export CONDA_CUDATOOLKIT_CONSTRAINT="- cuda >=11.6,<11.7 # [not osx]"
;; ;;
cu113) cu113)
export CONDA_CUDATOOLKIT_CONSTRAINT="- cudatoolkit >=11.3,<11.4 # [not osx]" export CONDA_CUDATOOLKIT_CONSTRAINT="- cudatoolkit >=11.3,<11.4 # [not osx]"
...@@ -286,7 +286,7 @@ setup_conda_cudatoolkit_plain_constraint() { ...@@ -286,7 +286,7 @@ setup_conda_cudatoolkit_plain_constraint() {
else else
case "$CU_VERSION" in case "$CU_VERSION" in
cu116) cu116)
export CONDA_CUDATOOLKIT_CONSTRAINT="cudatoolkit=11.6" export CONDA_CUDATOOLKIT_CONSTRAINT="cuda=11.6"
;; ;;
cu113) cu113)
export CONDA_CUDATOOLKIT_CONSTRAINT="cudatoolkit=11.3" export CONDA_CUDATOOLKIT_CONSTRAINT="cudatoolkit=11.3"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment