Skip to content

Commit e51b6cc

Browse files
author
pytorchbot
committed
2026-04-09 nightly release (6214cb2)
1 parent a8f6630 commit e51b6cc

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

packaging/windows/internal/vc_env_helper.bat

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ if "%VSDEVCMD_ARGS%" == "" (
2323
if "%CU_VERSION%" == "xpu" call "C:\Program Files (x86)\Intel\oneAPI\setvars.bat"
2424

2525
set DISTUTILS_USE_SDK=1
26-
set CL=%CL% /Zc:preprocessor
2726

2827
set args=%1
2928
shift

setup.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)