diff --git a/packaging/torchvision/bld.bat b/packaging/torchvision/bld.bat index 0f1265c25f6..870759c67b7 100644 --- a/packaging/torchvision/bld.bat +++ b/packaging/torchvision/bld.bat @@ -18,6 +18,7 @@ set NVCC_FLAGS=-D__CUDA_NO_HALF_OPERATORS__ --expt-relaxed-constexpr if "%desired_cuda%" == "9.0" set NVCC_FLAGS=%NVCC_FLAGS% -gencode=arch=compute_35,code=sm_35 -gencode=arch=compute_50,code=sm_50 -gencode=arch=compute_60,code=sm_60 -gencode=arch=compute_70,code=sm_70 -gencode=arch=compute_50,code=compute_50 if "%desired_cuda%" == "9.2" set NVCC_FLAGS=%NVCC_FLAGS% -gencode=arch=compute_35,code=sm_35 -gencode=arch=compute_50,code=sm_50 -gencode=arch=compute_60,code=sm_60 -gencode=arch=compute_61,code=sm_61 -gencode=arch=compute_70,code=sm_70 -gencode=arch=compute_50,code=compute_50 if "%desired_cuda%" == "10.0" set NVCC_FLAGS=%NVCC_FLAGS% -gencode=arch=compute_35,code=sm_35 -gencode=arch=compute_50,code=sm_50 -gencode=arch=compute_60,code=sm_60 -gencode=arch=compute_70,code=sm_70 -gencode=arch=compute_75,code=sm_75 -gencode=arch=compute_50,code=compute_50 +if "%desired_cuda%" == "10.1" set NVCC_FLAGS=%NVCC_FLAGS% -gencode=arch=compute_35,code=sm_35 -gencode=arch=compute_50,code=sm_50 -gencode=arch=compute_60,code=sm_60 -gencode=arch=compute_70,code=sm_70 -gencode=arch=compute_75,code=sm_75 -gencode=arch=compute_50,code=compute_50 :cuda_flags_end diff --git a/packaging/windows/cuda101.bat b/packaging/windows/cuda101.bat new file mode 100644 index 00000000000..db397d593c8 --- /dev/null +++ b/packaging/windows/cuda101.bat @@ -0,0 +1,59 @@ +@echo off + +IF NOT "%BUILD_VISION%" == "" ( + set MODULE_NAME=vision +) ELSE ( + set MODULE_NAME=pytorch +) + +IF NOT EXIST "setup.py" IF NOT EXIST "%MODULE_NAME%" ( + call internal\clone.bat + cd .. + IF ERRORLEVEL 1 goto eof +) ELSE ( + call internal\clean.bat +) + +call internal\check_deps.bat +IF ERRORLEVEL 1 goto eof + +REM Check for optional components + +set NO_CUDA= +set CMAKE_GENERATOR=Visual Studio 15 2017 Win64 + +IF "%NVTOOLSEXT_PATH%"=="" ( + echo NVTX ^(Visual Studio Extension ^for CUDA^) ^not installed, failing + exit /b 1 + goto optcheck +) + +IF "%CUDA_PATH_V10_1%"=="" ( + echo CUDA 10.1 not found, failing + exit /b 1 +) ELSE ( + IF "%BUILD_VISION%" == "" ( + set TORCH_CUDA_ARCH_LIST=3.5;5.0+PTX;6.0;6.1;7.0;7.5 + set TORCH_NVCC_FLAGS=-Xfatbin -compress-all + ) ELSE ( + set NVCC_FLAGS=-D__CUDA_NO_HALF_OPERATORS__ --expt-relaxed-constexpr -gencode=arch=compute_35,code=sm_35 -gencode=arch=compute_50,code=sm_50 -gencode=arch=compute_60,code=sm_60 -gencode=arch=compute_70,code=sm_70 -gencode=arch=compute_75,code=sm_75 -gencode=arch=compute_50,code=compute_50 + ) + + set "CUDA_PATH=%CUDA_PATH_V10_1%" + set "PATH=%CUDA_PATH_V10_1%\bin;%PATH%" +) + +:optcheck + +IF "%BUILD_VISION%" == "" ( + call internal\check_opts.bat + IF ERRORLEVEL 1 goto eof + + call internal\copy.bat + IF ERRORLEVEL 1 goto eof +) + +call internal\setup.bat +IF ERRORLEVEL 1 goto eof + +:eof diff --git a/packaging/windows/internal/cuda_install.bat b/packaging/windows/internal/cuda_install.bat index a85018b11d7..63c501f96db 100644 --- a/packaging/windows/internal/cuda_install.bat +++ b/packaging/windows/internal/cuda_install.bat @@ -16,6 +16,7 @@ set CUDA_VERSION_STR=%CUDA_VER_MAJOR%.%CUDA_VER_MINOR% if %CUDA_VER% EQU 92 goto cuda92 if %CUDA_VER% EQU 100 goto cuda100 +if %CUDA_VER% EQU 101 goto cuda101 echo CUDA %CUDA_VERSION_STR% is not supported exit /b 1 @@ -53,6 +54,23 @@ if not exist "%SRC_DIR%\temp_build\cudnn-10.0-windows10-x64-v7.4.1.5.zip" ( goto cuda_common +:cuda101 + +if not exist "%SRC_DIR%\temp_build\cuda_10.1.243_426.00_win10.exe" ( + curl -k -L http://developer.download.nvidia.com/compute/cuda/10.1/Prod/local_installers/cuda_10.1.243_426.00_win10.exe --output "%SRC_DIR%\temp_build\cuda_10.1.243_426.00_win10.exe" + if errorlevel 1 exit /b 1 + set "CUDA_SETUP_FILE=%SRC_DIR%\temp_build\cuda_10.1.243_426.00_win10.exe" + set "ARGS=nvcc_10.1 cuobjdump_10.1 nvprune_10.1 cupti_10.1 cublas_10.1 cublas_dev_10.1 cudart_10.1 cufft_10.1 cufft_dev_10.1 curand_10.1 curand_dev_10.1 cusolver_10.1 cusolver_dev_10.1 cusparse_10.1 cusparse_dev_10.1 nvgraph_10.1 nvgraph_dev_10.1 npp_10.1 npp_dev_10.1 nvrtc_10.1 nvrtc_dev_10.1 nvml_dev_10.1" +) + +if not exist "%SRC_DIR%\temp_build\cudnn-10.1-windows10-x64-v7.6.4.38.zip" ( + curl -k -L https://www.dropbox.com/s/i3aur3wh9lykmgx/cudnn-10.1-windows10-x64-v7.6.4.38.zip?dl=1 --output "%SRC_DIR%\temp_build\cudnn-10.1-windows10-x64-v7.6.4.38.zip" + if errorlevel 1 exit /b 1 + set "CUDNN_SETUP_FILE=%SRC_DIR%\temp_build\cudnn-10.1-windows10-x64-v7.6.4.38.zip" +) + +goto cuda_common + :cuda_common if not exist "%SRC_DIR%\temp_build\NvToolsExt.7z" ( diff --git a/packaging/windows/internal/nightly_defaults.bat b/packaging/windows/internal/nightly_defaults.bat index 208d8b85e78..1bba23209b1 100644 --- a/packaging/windows/internal/nightly_defaults.bat +++ b/packaging/windows/internal/nightly_defaults.bat @@ -147,7 +147,7 @@ if "%CUDA_VERSION%" == "cpu" ( if "%TORCHVISION_BUILD_VERSION%" == "" set TORCHVISION_BUILD_VERSION=0.5.0.dev%NIGHTLIES_DATE_COMPACT% if "%~1" == "Wheels" ( - if not "%CUDA_VERSION%" == "100" ( + if not "%CUDA_VERSION%" == "101" ( set TORCHVISION_BUILD_VERSION=%TORCHVISION_BUILD_VERSION%+%_DESIRED_CUDA% ) ) diff --git a/packaging/windows/internal/publish.bat b/packaging/windows/internal/publish.bat index 6ee9ef853a0..7f118bbb6e3 100644 --- a/packaging/windows/internal/publish.bat +++ b/packaging/windows/internal/publish.bat @@ -15,7 +15,11 @@ if "%PACKAGEFULLNAME%" == "Conda" ( set PACKAGE=wheels ) -set PUBLISH_BRANCH=%PACKAGE%_%DESIRED_PYTHON%%PACKAGE_SUFFIX% +if not defined PACKAGE_SUFFIX ( + set PUBLISH_BRANCH=vision_%PACKAGE%_%DESIRED_PYTHON% +) else ( + set PUBLISH_BRANCH=vision_%PACKAGE%_%DESIRED_PYTHON%%PACKAGE_SUFFIX% +) git clone %ARTIFACT_REPO_URL% -b %PUBLISH_BRANCH% --single-branch >nul 2>&1 diff --git a/packaging/windows/cuda100.bat b/packaging/windows/old/cuda100.bat similarity index 100% rename from packaging/windows/cuda100.bat rename to packaging/windows/old/cuda100.bat diff --git a/packaging/windows/templates/build_task.yml b/packaging/windows/templates/build_task.yml index e0008bd6766..e595662d313 100644 --- a/packaging/windows/templates/build_task.yml +++ b/packaging/windows/templates/build_task.yml @@ -65,15 +65,15 @@ jobs: PY3.7_92: DESIRED_PYTHON: 3.7 CUDA_VERSION: 92 - PY3.5_100: + PY3.5_101: DESIRED_PYTHON: 3.5 - CUDA_VERSION: 100 - PY3.6_100: + CUDA_VERSION: 101 + PY3.6_101: DESIRED_PYTHON: 3.6 - CUDA_VERSION: 100 - PY3.7_100: + CUDA_VERSION: 101 + PY3.7_101: DESIRED_PYTHON: 3.7 - CUDA_VERSION: 100 + CUDA_VERSION: 101 pool: ${{ if eq(parameters.msagent, 'true') }}: