Skip to content

Commit 669cbd4

Browse files
authored
use c++17 when building windows smoke tests (#1365)
Summary: We are seeing failures during CI dealing with some headers that have nested namespaces. This is expected to remedy them. One such example: https://github.com/pytorch/pytorch/actions/runs/4510336715/jobs/7942660912 Test Plan: Test this with CI.
1 parent a007fbc commit 669cbd4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

windows/internal/smoke_test.bat

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -177,13 +177,13 @@ set INCLUDE=%INCLUDE%;%install_root%\include;%install_root%\include\torch\csrc\a
177177
set LIB=%LIB%;%install_root%\lib
178178
set PATH=%PATH%;%install_root%\lib
179179

180-
cl %BUILDER_ROOT%\test_example_code\simple-torch-test.cpp c10.lib torch_cpu.lib /EHsc
180+
cl %BUILDER_ROOT%\test_example_code\simple-torch-test.cpp c10.lib torch_cpu.lib /EHsc /std:c++17
181181
if ERRORLEVEL 1 exit /b 1
182182

183183
.\simple-torch-test.exe
184184
if ERRORLEVEL 1 exit /b 1
185185

186-
cl %BUILDER_ROOT%\test_example_code\check-torch-mkl.cpp c10.lib torch_cpu.lib /EHsc
186+
cl %BUILDER_ROOT%\test_example_code\check-torch-mkl.cpp c10.lib torch_cpu.lib /EHsc /std:c++17
187187
if ERRORLEVEL 1 exit /b 1
188188

189189
.\check-torch-mkl.exe
@@ -198,9 +198,9 @@ set BUILD_SPLIT_CUDA=
198198
if exist "%install_root%\lib\torch_cuda_cu.lib" if exist "%install_root%\lib\torch_cuda_cpp.lib" set BUILD_SPLIT_CUDA=ON
199199

200200
if "%BUILD_SPLIT_CUDA%" == "ON" (
201-
cl %BUILDER_ROOT%\test_example_code\check-torch-cuda.cpp torch_cpu.lib c10.lib torch_cuda_cu.lib torch_cuda_cpp.lib /EHsc /link /INCLUDE:?warp_size@cuda@at@@YAHXZ /INCLUDE:?_torch_cuda_cu_linker_symbol_op_cuda@native@at@@YA?AVTensor@2@AEBV32@@Z
201+
cl %BUILDER_ROOT%\test_example_code\check-torch-cuda.cpp torch_cpu.lib c10.lib torch_cuda_cu.lib torch_cuda_cpp.lib /EHsc /std:c++17 /link /INCLUDE:?warp_size@cuda@at@@YAHXZ /INCLUDE:?_torch_cuda_cu_linker_symbol_op_cuda@native@at@@YA?AVTensor@2@AEBV32@@Z
202202
) else (
203-
cl %BUILDER_ROOT%\test_example_code\check-torch-cuda.cpp torch_cpu.lib c10.lib torch_cuda.lib /EHsc /link /INCLUDE:?warp_size@cuda@at@@YAHXZ
203+
cl %BUILDER_ROOT%\test_example_code\check-torch-cuda.cpp torch_cpu.lib c10.lib torch_cuda.lib /EHsc /std:c++17 /link /INCLUDE:?warp_size@cuda@at@@YAHXZ
204204
)
205205
.\check-torch-cuda.exe
206206
if ERRORLEVEL 1 exit /b 1

0 commit comments

Comments
 (0)