File tree Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -65,6 +65,20 @@ if "%CUDA_VERSION%" == "80" (
65
65
set " CUDAHOSTCXX = %VS140COMNTOOLS% \..\..\VC\bin\amd64\cl.exe"
66
66
)
67
67
68
+ :: randomtemp is used to resolve the intermittent build error related to CUDA.
69
+ :: code: https://github.com/peterjc123/randomtemp
70
+ :: issue: https://github.com/pytorch/pytorch/issues/25393
71
+ ::
72
+ :: Previously, CMake uses CUDA_NVCC_EXECUTABLE for finding nvcc and then
73
+ :: the calls are redirected to sccache. sccache looks for the actual nvcc
74
+ :: in PATH, and then pass the arguments to it.
75
+ :: Currently, randomtemp is placed before sccache (%TMP_DIR_WIN%\bin\nvcc)
76
+ :: so we are actually pretending sccache instead of nvcc itself.
77
+ curl -kL https://github.com/peterjc123/randomtemp/releases/download/v0.3/randomtemp.exe --output %SRC_DIR% \tmp_bin\randomtemp.exe
78
+ set RANDOMTEMP_EXECUTABLE = %SRC_DIR% \tmp_bin\nvcc.exe
79
+ set CUDA_NVCC_EXECUTABLE = %SRC_DIR% \tmp_bin\randomtemp.exe
80
+ set RANDOMTEMP_BASEDIR = %SRC_DIR% \tmp_bin
81
+
68
82
:cuda_end
69
83
70
84
set CMAKE_GENERATOR = Ninja
Original file line number Diff line number Diff line change @@ -101,6 +101,20 @@ if "%USE_SCCACHE%" == "1" (
101
101
set CUDA_NVCC_EXECUTABLE = %CD% \tmp_bin\nvcc
102
102
set ADDITIONAL_PATH = %CD% \tmp_bin
103
103
set SCCACHE_IDLE_TIMEOUT = 1500
104
+
105
+ :: randomtemp is used to resolve the intermittent build error related to CUDA.
106
+ :: code: https://github.com/peterjc123/randomtemp
107
+ :: issue: https://github.com/pytorch/pytorch/issues/25393
108
+ ::
109
+ :: Previously, CMake uses CUDA_NVCC_EXECUTABLE for finding nvcc and then
110
+ :: the calls are redirected to sccache. sccache looks for the actual nvcc
111
+ :: in PATH, and then pass the arguments to it.
112
+ :: Currently, randomtemp is placed before sccache (%TMP_DIR_WIN%\bin\nvcc)
113
+ :: so we are actually pretending sccache instead of nvcc itself.
114
+ curl -kL https://github.com/peterjc123/randomtemp/releases/download/v0.3/randomtemp.exe --output %CD% \tmp_bin\randomtemp.exe
115
+ set RANDOMTEMP_EXECUTABLE = %CD% \tmp_bin\nvcc.exe
116
+ set CUDA_NVCC_EXECUTABLE = %CD% \tmp_bin\randomtemp.exe
117
+ set RANDOMTEMP_BASEDIR = %CD% \tmp_bin
104
118
)
105
119
)
106
120
You can’t perform that action at this time.
0 commit comments