Skip to content

Commit eca5746

Browse files
author
pytorchbot
committed
2025-09-06 nightly release (7bd8066)
1 parent 099804a commit eca5746

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

setup.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import shutil
77
import subprocess
88
import sys
9+
import sysconfig
910
import warnings
1011
from pathlib import Path
1112

@@ -136,6 +137,8 @@ def get_macros_and_flags():
136137
if sys.platform == "win32":
137138
define_macros += [("torchvision_EXPORTS", None)]
138139
extra_compile_args["cxx"].append("/MP")
140+
if sysconfig.get_config_var("Py_GIL_DISABLED"):
141+
extra_compile_args["cxx"].append("-DPy_GIL_DISABLED")
139142

140143
if DEBUG:
141144
extra_compile_args["cxx"].append("-g")

0 commit comments

Comments
 (0)