Skip to content

Commit 81af070

Browse files
committed
Unify casing in Batch files, remove VS 2017 installation.
1 parent 5f3864f commit 81af070

File tree

6 files changed

+6
-55
lines changed

6 files changed

+6
-55
lines changed

windows/internal/check_deps.bat

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,14 @@ IF "%BUILD_VISION%" == "" (
1616
)
1717
)
1818

19-
IF NOT EXIST "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" (
19+
if not exist "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" (
2020
echo Visual Studio %VC_YEAR% C++ BuildTools is required to compile PyTorch on Windows
2121
exit /b 1
2222
)
2323

2424
set VC_VERSION_LOWER=17
2525
set VC_VERSION_UPPER=18
26-
IF "%VC_YEAR%" == "2017" (
27-
set VC_VERSION_LOWER=15
28-
set VC_VERSION_UPPER=16
29-
)
30-
IF "%VC_YEAR%" == "2019" (
26+
if "%VC_YEAR%" == "2019" (
3127
set VC_VERSION_LOWER=16
3228
set VC_VERSION_UPPER=17
3329
)

windows/internal/cuda_install.bat

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,6 @@ if not exist "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v%CUDA_VERSION_
137137
popd
138138

139139
echo Installing VS integration...
140-
if "%VC_YEAR%" == "2017" (
141-
xcopy /Y "%SRC_DIR%\temp_build\cuda\CUDAVisualStudioIntegration\extras\visual_studio_integration\MSBuildExtensions\*.*" "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\IDE\VC\VCTargets\BuildCustomizations"
142-
)
143140
if "%VC_YEAR%" == "2019" (
144141
xcopy /Y "%SRC_DIR%\temp_build\cuda\CUDAVisualStudioIntegration\extras\visual_studio_integration\MSBuildExtensions\*.*" "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Microsoft\VC\v160\BuildCustomizations"
145142
)

windows/internal/env_fix.bat

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,14 @@
55

66
setlocal
77

8-
IF NOT EXIST "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" (
8+
if not exist "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" (
99
echo Visual Studio %VC_YEAR% C++ BuildTools is required to compile PyTorch on Windows
1010
exit /b 1
1111
)
1212

1313
set VC_VERSION_LOWER=17
1414
set VC_VERSION_UPPER=18
15-
IF "%VC_YEAR%" == "2017" (
16-
set VC_VERSION_LOWER=15
17-
set VC_VERSION_UPPER=16
18-
)
19-
IF "%VC_YEAR%" == "2019" (
15+
if "%VC_YEAR%" == "2019" (
2016
set VC_VERSION_LOWER=16
2117
set VC_VERSION_UPPER=17
2218
)
@@ -31,7 +27,7 @@ for /f "usebackq tokens=*" %%i in (`"%ProgramFiles(x86)%\Microsoft Visual Studio
3127

3228
:vswhere
3329

34-
IF "%VS15VCVARSALL%"=="" (
30+
if "%VS15VCVARSALL%"=="" (
3531
echo Visual Studio %VC_YEAR% C++ BuildTools is required to compile PyTorch on Windows
3632
exit /b 1
3733
)

windows/internal/smoke_test.bat

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,6 @@ goto end
147147
:libtorch
148148
echo "install and test libtorch"
149149

150-
if "%VC_YEAR%" == "2017" powershell internal\vs2017_install.ps1
151150
if "%VC_YEAR%" == "2019" powershell internal\vs2019_install.ps1
152151
if "%VC_YEAR%" == "2022" powershell internal\vs2022_install.ps1
153152

@@ -160,10 +159,6 @@ pushd tmp\libtorch
160159

161160
set VC_VERSION_LOWER=17
162161
set VC_VERSION_UPPER=18
163-
IF "%VC_YEAR%" == "2017" (
164-
set VC_VERSION_LOWER=15
165-
set VC_VERSION_UPPER=16
166-
)
167162
IF "%VC_YEAR%" == "2019" (
168163
set VC_VERSION_LOWER=16
169164
set VC_VERSION_UPPER=17

windows/internal/vc_install_helper.bat

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,9 @@
1-
if "%VC_YEAR%" == "2017" powershell windows/internal/vs2017_install.ps1
21
if "%VC_YEAR%" == "2019" powershell windows/internal/vs2019_install.ps1
32
if "%VC_YEAR%" == "2022" powershell windows/internal/vs2022_install.ps1
43

54
set VC_VERSION_LOWER=17
65
set VC_VERSION_UPPER=18
7-
IF "%VC_YEAR%" == "2017" (
8-
set VC_VERSION_LOWER=15
9-
set VC_VERSION_UPPER=16
10-
)
11-
IF "%VC_YEAR%" == "2019" (
6+
if "%VC_YEAR%" == "2019" (
127
set VC_VERSION_LOWER=16
138
set VC_VERSION_UPPER=17
149
)

windows/internal/vs2017_install.ps1

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

0 commit comments

Comments
 (0)