Skip to content

Commit

Permalink
Refactor not to cal install nightly package
Browse files Browse the repository at this point in the history
  • Loading branch information
atalman committed Dec 5, 2022
1 parent 7f3ac9e commit ac580c8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 87 deletions.
67 changes: 0 additions & 67 deletions windows/internal/install_nightly_package.bat

This file was deleted.

30 changes: 10 additions & 20 deletions windows/internal/smoke_test.bat
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,7 @@ set "PATH=%CD%\Python%PYTHON_VERSION%\Scripts;%CD%\Python;%PATH%"
pip install -q numpy protobuf "mkl>=2019"
if errorlevel 1 exit /b 1

if NOT "%PYTORCH_BUILD_VERSION%"=="%PYTORCH_BUILD_VERSION:dev=%" (
call internal\install_nightly_package.bat
if errorlevel 1 exit /b 1
) else (
if "%PYTORCH_BUILD_VERSION%"=="%PYTORCH_BUILD_VERSION:dev=%" (
for /F "delims=" %%i in ('where /R "%PYTORCH_FINAL_PACKAGE_DIR:/=\%" *.whl') do pip install "%%i"
if errorlevel 1 exit /b 1
)
Expand Down Expand Up @@ -106,20 +103,16 @@ set CUDA_VER_MAJOR=%CUDA_VERSION:~0,-1%
set CUDA_VER_MINOR=%CUDA_VERSION:~-1,1%
set CUDA_VERSION_STR=%CUDA_VER_MAJOR%.%CUDA_VER_MINOR%

if NOT "%PYTORCH_BUILD_VERSION%"=="%PYTORCH_BUILD_VERSION:dev=%" (
call internal\install_nightly_package.bat
if errorlevel 1 exit /b 1
goto smoke_test
)

for /F "delims=" %%i in ('where /R "%PYTORCH_FINAL_PACKAGE_DIR:/=\%" *.tar.bz2') do call conda install %CONDA_EXTRA_ARGS% -y "%%i" --offline
if ERRORLEVEL 1 exit /b 1
if "%PYTORCH_BUILD_VERSION%"=="%PYTORCH_BUILD_VERSION:dev=%" (
for /F "delims=" %%i in ('where /R "%PYTORCH_FINAL_PACKAGE_DIR:/=\%" *.tar.bz2') do call conda install %CONDA_EXTRA_ARGS% -y "%%i" --offline
if ERRORLEVEL 1 exit /b 1

if "%CUDA_VERSION%" == "cpu" goto install_cpu_torch
if "%CUDA_VERSION%" == "cpu" goto install_cpu_torch

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

goto smoke_test

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

if NOT "%PYTORCH_BUILD_VERSION%"=="%PYTORCH_BUILD_VERSION:dev=%" (
call internal\install_nightly_package.bat
if errorlevel 1 exit /b 1
) else (
if "%PYTORCH_BUILD_VERSION%"=="%PYTORCH_BUILD_VERSION:dev=%" (
for /F "delims=" %%i in ('where /R "%PYTORCH_FINAL_PACKAGE_DIR:/=\%" *-latest.zip') do 7z x "%%i" -otmp
if ERRORLEVEL 1 exit /b 1
)
Expand Down

0 comments on commit ac580c8

Please sign in to comment.