@@ -17,7 +17,7 @@ set CUDNN_FOLDER="cuda"
1717set CUDNN_LIB_FOLDER = " lib\x64"
1818
1919:: Skip all of this if we already have cuda installed
20- if exist " C:\\ Program Files\NVIDIA GPU Computing Toolkit\CUDA\v%CUDA_VERSION_STR% \bin\nvcc.exe" goto set_cuda_env_vars
20+ if exist " C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v%CUDA_VERSION_STR% \bin\nvcc.exe" goto set_cuda_env_vars
2121
2222if %CUDA_VER% EQU 116 goto cuda116
2323if %CUDA_VER% EQU 117 goto cuda117
@@ -112,7 +112,7 @@ goto cuda_common
112112:: With GHA runners these should be pre-installed as part of our AMI process
113113:: If you cannot find the CUDA version you want to build for here then please
114114:: add it @ https://github.com/pytorch/test-infra/tree/main/aws/ami/windows
115- if not exist " C:\\ Program Files\NVIDIA GPU Computing Toolkit\CUDA\v%CUDA_VERSION_STR% \bin\nvcc.exe" (
115+ if not exist " C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v%CUDA_VERSION_STR% \bin\nvcc.exe" (
116116 if not exist " %SRC_DIR% \temp_build\NvToolsExt.7z" (
117117 curl -k -L https://ossci-windows.s3.us-east-1.amazonaws.com/builder/NvToolsExt.7z --output " %SRC_DIR% \temp_build\NvToolsExt.7z"
118118 if errorlevel 1 exit /b 1
@@ -143,6 +143,9 @@ if not exist "C:\\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v%CUDA_VERSION
143143 if " %VC_YEAR% " == " 2019" (
144144 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"
145145 )
146+ if " %VC_YEAR% " == " 2022" (
147+ xcopy /Y " %SRC_DIR% \temp_build\cuda\CUDAVisualStudioIntegration\extras\visual_studio_integration\MSBuildExtensions\*.*" " C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\BuildCustomizations"
148+ )
146149
147150 echo Installing NvToolsExt...
148151 7z x %SRC_DIR% \temp_build\NvToolsExt.7z -o" %SRC_DIR% \temp_build\NvToolsExt"
0 commit comments