File tree Expand file tree Collapse file tree
packaging/windows/internal Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -23,7 +23,6 @@ if "%VSDEVCMD_ARGS%" == "" (
2323if " %CU_VERSION% " == " xpu" call " C:\Program Files (x86)\Intel\oneAPI\setvars.bat"
2424
2525set DISTUTILS_USE_SDK = 1
26- set CL = %CL% /Zc:preprocessor
2726
2827set args = %1
2928shift
Original file line number Diff line number Diff line change @@ -128,6 +128,11 @@ def get_macros_and_flags():
128128 if sys .platform == "win32" :
129129 define_macros += [("torchvision_EXPORTS" , None )]
130130 extra_compile_args ["cxx" ].append ("/MP" )
131+ extra_compile_args ["cxx" ].append ("/Zc:preprocessor" )
132+ if "nvcc" in extra_compile_args :
133+ extra_compile_args ["nvcc" ].append ("-Xcompiler" )
134+ extra_compile_args ["nvcc" ].append ("/Zc:preprocessor" )
135+ extra_compile_args ["nvcc" ].append ("-DCCCL_IGNORE_MSVC_TRADITIONAL_PREPROCESSOR_WARNING" )
131136 if sysconfig .get_config_var ("Py_GIL_DISABLED" ):
132137 extra_compile_args ["cxx" ].append ("-DPy_GIL_DISABLED" )
133138
You can’t perform that action at this time.
0 commit comments