Skip to content

Commit ac580c8

Browse files
committed
Refactor not to cal install nightly package
1 parent 7f3ac9e commit ac580c8

File tree

2 files changed

+10
-87
lines changed

2 files changed

+10
-87
lines changed

windows/internal/install_nightly_package.bat

Lines changed: 0 additions & 67 deletions
This file was deleted.

windows/internal/smoke_test.bat

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,7 @@ set "PATH=%CD%\Python%PYTHON_VERSION%\Scripts;%CD%\Python;%PATH%"
5151
pip install -q numpy protobuf "mkl>=2019"
5252
if errorlevel 1 exit /b 1
5353

54-
if NOT "%PYTORCH_BUILD_VERSION%"=="%PYTORCH_BUILD_VERSION:dev=%" (
55-
call internal\install_nightly_package.bat
56-
if errorlevel 1 exit /b 1
57-
) else (
54+
if "%PYTORCH_BUILD_VERSION%"=="%PYTORCH_BUILD_VERSION:dev=%" (
5855
for /F "delims=" %%i in ('where /R "%PYTORCH_FINAL_PACKAGE_DIR:/=\%" *.whl') do pip install "%%i"
5956
if errorlevel 1 exit /b 1
6057
)
@@ -106,20 +103,16 @@ set CUDA_VER_MAJOR=%CUDA_VERSION:~0,-1%
106103
set CUDA_VER_MINOR=%CUDA_VERSION:~-1,1%
107104
set CUDA_VERSION_STR=%CUDA_VER_MAJOR%.%CUDA_VER_MINOR%
108105

109-
if NOT "%PYTORCH_BUILD_VERSION%"=="%PYTORCH_BUILD_VERSION:dev=%" (
110-
call internal\install_nightly_package.bat
111-
if errorlevel 1 exit /b 1
112-
goto smoke_test
113-
)
114-
115-
for /F "delims=" %%i in ('where /R "%PYTORCH_FINAL_PACKAGE_DIR:/=\%" *.tar.bz2') do call conda install %CONDA_EXTRA_ARGS% -y "%%i" --offline
116-
if ERRORLEVEL 1 exit /b 1
106+
if "%PYTORCH_BUILD_VERSION%"=="%PYTORCH_BUILD_VERSION:dev=%" (
107+
for /F "delims=" %%i in ('where /R "%PYTORCH_FINAL_PACKAGE_DIR:/=\%" *.tar.bz2') do call conda install %CONDA_EXTRA_ARGS% -y "%%i" --offline
108+
if ERRORLEVEL 1 exit /b 1
117109

118-
if "%CUDA_VERSION%" == "cpu" goto install_cpu_torch
110+
if "%CUDA_VERSION%" == "cpu" goto install_cpu_torch
119111

120-
:: We do an update --all here since that will install the dependencies for any package that's installed offline
121-
call conda update --all %CONDA_EXTRA_ARGS% -y -c pytorch -c defaults -c numba/label/dev
122-
if ERRORLEVEL 1 exit /b 1
112+
:: We do an update --all here since that will install the dependencies for any package that's installed offline
113+
call conda update --all %CONDA_EXTRA_ARGS% -y -c pytorch -c defaults -c numba/label/dev
114+
if ERRORLEVEL 1 exit /b 1
115+
)
123116

124117
goto smoke_test
125118

@@ -168,10 +161,7 @@ echo "install and test libtorch"
168161
if "%VC_YEAR%" == "2017" powershell internal\vs2017_install.ps1
169162
if ERRORLEVEL 1 exit /b 1
170163

171-
if NOT "%PYTORCH_BUILD_VERSION%"=="%PYTORCH_BUILD_VERSION:dev=%" (
172-
call internal\install_nightly_package.bat
173-
if errorlevel 1 exit /b 1
174-
) else (
164+
if "%PYTORCH_BUILD_VERSION%"=="%PYTORCH_BUILD_VERSION:dev=%" (
175165
for /F "delims=" %%i in ('where /R "%PYTORCH_FINAL_PACKAGE_DIR:/=\%" *-latest.zip') do 7z x "%%i" -otmp
176166
if ERRORLEVEL 1 exit /b 1
177167
)

0 commit comments

Comments
 (0)