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

Add CUDA-11.5 builds to torchvision (#5024)

* Add CUDA-11.5 builds to torchvision

* Try to fix cudatoolkit issue

* Trying to use cuda11.5 instead of the toolkit

* Trying to rollback last two changes

* Testing

* Using conda-forge only for cuda115 builds

* Fix typo
parent d716c426
This diff is collapsed.
...@@ -32,8 +32,8 @@ def build_workflows(prefix="", filter_branch=None, upload=False, indentation=6, ...@@ -32,8 +32,8 @@ def build_workflows(prefix="", filter_branch=None, upload=False, indentation=6,
for os_type in ["linux", "macos", "win"]: for os_type in ["linux", "macos", "win"]:
python_versions = PYTHON_VERSIONS python_versions = PYTHON_VERSIONS
cu_versions_dict = { cu_versions_dict = {
"linux": ["cpu", "cu102", "cu111", "cu113", "rocm4.2", "rocm4.3.1"], "linux": ["cpu", "cu102", "cu111", "cu113", "cu115", "rocm4.2", "rocm4.3.1"],
"win": ["cpu", "cu111", "cu113"], "win": ["cpu", "cu111", "cu113", "cu115"],
"macos": ["cpu"], "macos": ["cpu"],
} }
cu_versions = cu_versions_dict[os_type] cu_versions = cu_versions_dict[os_type]
...@@ -128,6 +128,7 @@ manylinux_images = { ...@@ -128,6 +128,7 @@ manylinux_images = {
"cu111": "pytorch/manylinux-cuda111", "cu111": "pytorch/manylinux-cuda111",
"cu112": "pytorch/manylinux-cuda112", "cu112": "pytorch/manylinux-cuda112",
"cu113": "pytorch/manylinux-cuda113", "cu113": "pytorch/manylinux-cuda113",
"cu115": "pytorch/manylinux-cuda115",
} }
......
...@@ -11,5 +11,11 @@ setup_conda_pytorch_constraint ...@@ -11,5 +11,11 @@ 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
conda build -c defaults -c nvidia $CONDA_CHANNEL_FLAGS --no-anaconda-upload --python "$PYTHON_VERSION" packaging/torchvision # nvidia channel included for cudatoolkit >= 11 however for 11.5 we use conda-forge
export CUDATOOLKIT_CHANNEL="nvidia"
if [[ "$CU_VERSION" == cu115 ]]; then
export CUDATOOLKIT_CHANNEL="conda-forge"
fi
conda build -c defaults -c $CUDATOOLKIT_CHANNEL $CONDA_CHANNEL_FLAGS --no-anaconda-upload --python "$PYTHON_VERSION" packaging/torchvision
...@@ -46,6 +46,14 @@ setup_cuda() { ...@@ -46,6 +46,14 @@ setup_cuda() {
# Now work out the CUDA settings # Now work out the CUDA settings
case "$CU_VERSION" in case "$CU_VERSION" in
cu115)
if [[ "$OSTYPE" == "msys" ]]; then
export CUDA_HOME="C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v11.5"
else
export CUDA_HOME=/usr/local/cuda-11.5/
fi
export TORCH_CUDA_ARCH_LIST="3.5;5.0+PTX;6.0;7.0;7.5;8.0;8.6"
;;
cu113) cu113)
if [[ "$OSTYPE" == "msys" ]]; then if [[ "$OSTYPE" == "msys" ]]; then
export CUDA_HOME="C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v11.3" export CUDA_HOME="C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v11.3"
...@@ -289,6 +297,9 @@ setup_conda_cudatoolkit_constraint() { ...@@ -289,6 +297,9 @@ setup_conda_cudatoolkit_constraint() {
export CONDA_BUILD_VARIANT="cpu" export CONDA_BUILD_VARIANT="cpu"
else else
case "$CU_VERSION" in case "$CU_VERSION" in
cu115)
export CONDA_CUDATOOLKIT_CONSTRAINT="- cudatoolkit >=11.5,<11.6 # [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]"
;; ;;
...@@ -333,6 +344,9 @@ setup_conda_cudatoolkit_plain_constraint() { ...@@ -333,6 +344,9 @@ setup_conda_cudatoolkit_plain_constraint() {
export CMAKE_USE_CUDA=0 export CMAKE_USE_CUDA=0
else else
case "$CU_VERSION" in case "$CU_VERSION" in
cu115)
export CONDA_CUDATOOLKIT_CONSTRAINT="cudatoolkit=11.5"
;;
cu113) cu113)
export CONDA_CUDATOOLKIT_CONSTRAINT="cudatoolkit=11.3" export CONDA_CUDATOOLKIT_CONSTRAINT="cudatoolkit=11.3"
;; ;;
......
...@@ -21,6 +21,7 @@ set CUDA_VER_MAJOR=%CUDA_VER:~0,-1% ...@@ -21,6 +21,7 @@ set CUDA_VER_MAJOR=%CUDA_VER:~0,-1%
set CUDA_VER_MINOR=%CUDA_VER:~-1,1% set CUDA_VER_MINOR=%CUDA_VER:~-1,1%
set CUDA_VERSION_STR=%CUDA_VER_MAJOR%.%CUDA_VER_MINOR% set CUDA_VERSION_STR=%CUDA_VER_MAJOR%.%CUDA_VER_MINOR%
if %CUDA_VER% EQU 92 goto cuda92 if %CUDA_VER% EQU 92 goto cuda92
if %CUDA_VER% EQU 100 goto cuda100 if %CUDA_VER% EQU 100 goto cuda100
if %CUDA_VER% EQU 101 goto cuda101 if %CUDA_VER% EQU 101 goto cuda101
...@@ -29,6 +30,8 @@ if %CUDA_VER% EQU 110 goto cuda110 ...@@ -29,6 +30,8 @@ if %CUDA_VER% EQU 110 goto cuda110
if %CUDA_VER% EQU 111 goto cuda111 if %CUDA_VER% EQU 111 goto cuda111
if %CUDA_VER% EQU 112 goto cuda112 if %CUDA_VER% EQU 112 goto cuda112
if %CUDA_VER% EQU 113 goto cuda113 if %CUDA_VER% EQU 113 goto cuda113
if %CUDA_VER% EQU 115 goto cuda115
echo CUDA %CUDA_VERSION_STR% is not supported echo CUDA %CUDA_VERSION_STR% is not supported
exit /b 1 exit /b 1
...@@ -180,6 +183,25 @@ if not exist "%SRC_DIR%\temp_build\%CUDNN_INSTALL_ZIP%" ( ...@@ -180,6 +183,25 @@ if not exist "%SRC_DIR%\temp_build\%CUDNN_INSTALL_ZIP%" (
goto cuda_common goto cuda_common
:cuda115
set CUDA_INSTALL_EXE=cuda_11.5.0_496.13_win10.exe
if not exist "%SRC_DIR%\temp_build\%CUDA_INSTALL_EXE%" (
curl -k -L "https://ossci-windows.s3.amazonaws.com/%CUDA_INSTALL_EXE%" --output "%SRC_DIR%\temp_build\%CUDA_INSTALL_EXE%"
if errorlevel 1 exit /b 1
set "CUDA_SETUP_FILE=%SRC_DIR%\temp_build\%CUDA_INSTALL_EXE%"
set "ARGS=thrust_11.5 nvcc_11.5 cuobjdump_11.5 nvprune_11.5 nvprof_11.5 cupti_11.5 cublas_11.5 cublas_dev_11.5 cudart_11.5 cufft_11.5 cufft_dev_11.5 curand_11.5 curand_dev_11.5 cusolver_11.5 cusolver_dev_11.5 cusparse_11.5 cusparse_dev_11.5 npp_11.5 npp_dev_11.5 nvrtc_11.5 nvrtc_dev_11.5 nvml_dev_11.5"
)
set CUDNN_INSTALL_ZIP=cudnn-11.3-windows-x64-v8.2.0.53.zip
if not exist "%SRC_DIR%\temp_build\%CUDNN_INSTALL_ZIP%" (
curl -k -L "http://s3.amazonaws.com/ossci-windows/%CUDNN_INSTALL_ZIP%" --output "%SRC_DIR%\temp_build\%CUDNN_INSTALL_ZIP%"
if errorlevel 1 exit /b 1
set "CUDNN_SETUP_FILE=%SRC_DIR%\temp_build\%CUDNN_INSTALL_ZIP%"
)
goto cuda_common
:cuda_common :cuda_common
if not exist "%SRC_DIR%\temp_build\NvToolsExt.7z" ( if not exist "%SRC_DIR%\temp_build\NvToolsExt.7z" (
......
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