Commit 0a701058 authored by Andrey Talman's avatar Andrey Talman Committed by Facebook GitHub Bot
Browse files

Add CUDA-11.5 builds to torchaudio (#2067)

Summary:
cc peterjc123 maxluk nbcsm guyang3532 gunandrose4u smartcat2010 mszhanyi

Pull Request resolved: https://github.com/pytorch/audio/pull/2067

Reviewed By: seemethere

Differential Revision: D33032607

Pulled By: atalman

fbshipit-source-id: a5767e9af27690d3a7ab762ddf30178b3069cd35
parent 71c2ae77
This diff is collapsed.
...@@ -21,8 +21,8 @@ import os.path ...@@ -21,8 +21,8 @@ import os.path
PYTHON_VERSIONS = ["3.6", "3.7", "3.8", "3.9"] PYTHON_VERSIONS = ["3.6", "3.7", "3.8", "3.9"]
CU_VERSIONS_DICT = {"linux": ["cpu", "cu102", "cu111","cu113", "rocm4.1"], CU_VERSIONS_DICT = {"linux": ["cpu", "cu102", "cu111","cu113", "cu115", "rocm4.1"],
"windows": ["cpu", "cu113"], "windows": ["cpu", "cu113", "cu115"],
"macos": ["cpu"]} "macos": ["cpu"]}
......
...@@ -10,5 +10,11 @@ export SOURCE_ROOT_DIR="$PWD" ...@@ -10,5 +10,11 @@ export SOURCE_ROOT_DIR="$PWD"
setup_conda_pytorch_constraint setup_conda_pytorch_constraint
setup_conda_cudatoolkit_constraint setup_conda_cudatoolkit_constraint
setup_visual_studio_constraint setup_visual_studio_constraint
# nvidia channel included for cudatoolkit >= 11
conda build -c defaults -c nvidia $CONDA_CHANNEL_FLAGS --no-anaconda-upload --python "$PYTHON_VERSION" packaging/torchaudio # 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/torchaudio
...@@ -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"
...@@ -251,6 +259,9 @@ setup_conda_cudatoolkit_constraint() { ...@@ -251,6 +259,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]"
;; ;;
......
...@@ -29,6 +29,7 @@ if %CUDA_VER% EQU 110 goto cuda110 ...@@ -29,6 +29,7 @@ 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
...@@ -183,6 +184,25 @@ if not exist "%SRC_DIR%\temp_build\%CUDNN_INSTALL_ZIP%" ( ...@@ -183,6 +184,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" (
...@@ -228,7 +248,7 @@ set "NVTOOLSEXT_PATH=%ProgramFiles%\NVIDIA Corporation\NvToolsExt\bin\x64" ...@@ -228,7 +248,7 @@ set "NVTOOLSEXT_PATH=%ProgramFiles%\NVIDIA Corporation\NvToolsExt\bin\x64"
if not exist "%ProgramFiles%\NVIDIA GPU Computing Toolkit\CUDA\v%CUDA_VERSION_STR%\bin\nvcc.exe" ( if not exist "%ProgramFiles%\NVIDIA GPU Computing Toolkit\CUDA\v%CUDA_VERSION_STR%\bin\nvcc.exe" (
echo CUDA %CUDA_VERSION_STR% installed failed. echo CUDA %CUDA_VERSION_STR% installed failed.
echo --------- RunDll32.exe.log echo --------- RunDll32.exe.log
type "%SRC_DIR%\temp_build\cuda\cuda_install_logs\LOG.RunDll32.exe.log" type "%SRC_DIR%\temp_build\cuda\cuda_install_logs\LOG.RunDll32.exe.log"
echo --------- setup.exe.log ------- echo --------- setup.exe.log -------
type "%SRC_DIR%\temp_build\cuda\cuda_install_logs\LOG.setup.exe.log" type "%SRC_DIR%\temp_build\cuda\cuda_install_logs\LOG.setup.exe.log"
exit /b 1 exit /b 1
......
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