From 875a00f38a259ae362378ac382b0b72f078270f3 Mon Sep 17 00:00:00 2001 From: mikey dagitses Date: Fri, 24 Mar 2023 06:28:38 -0700 Subject: [PATCH] use c++17 when building windows smoke tests 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. --- windows/internal/smoke_test.bat | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/windows/internal/smoke_test.bat b/windows/internal/smoke_test.bat index bc8ddfc52..2e1b1b243 100644 --- a/windows/internal/smoke_test.bat +++ b/windows/internal/smoke_test.bat @@ -177,13 +177,13 @@ set INCLUDE=%INCLUDE%;%install_root%\include;%install_root%\include\torch\csrc\a set LIB=%LIB%;%install_root%\lib set PATH=%PATH%;%install_root%\lib -cl %BUILDER_ROOT%\test_example_code\simple-torch-test.cpp c10.lib torch_cpu.lib /EHsc +cl %BUILDER_ROOT%\test_example_code\simple-torch-test.cpp c10.lib torch_cpu.lib /EHsc /std:c++17 if ERRORLEVEL 1 exit /b 1 .\simple-torch-test.exe if ERRORLEVEL 1 exit /b 1 -cl %BUILDER_ROOT%\test_example_code\check-torch-mkl.cpp c10.lib torch_cpu.lib /EHsc +cl %BUILDER_ROOT%\test_example_code\check-torch-mkl.cpp c10.lib torch_cpu.lib /EHsc /std:c++17 if ERRORLEVEL 1 exit /b 1 .\check-torch-mkl.exe @@ -198,9 +198,9 @@ set BUILD_SPLIT_CUDA= if exist "%install_root%\lib\torch_cuda_cu.lib" if exist "%install_root%\lib\torch_cuda_cpp.lib" set BUILD_SPLIT_CUDA=ON if "%BUILD_SPLIT_CUDA%" == "ON" ( - 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 + 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 ) else ( - 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 + 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 ) .\check-torch-cuda.exe if ERRORLEVEL 1 exit /b 1