We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 099804a commit eca5746Copy full SHA for eca5746
setup.py
@@ -6,6 +6,7 @@
6
import shutil
7
import subprocess
8
import sys
9
+import sysconfig
10
import warnings
11
from pathlib import Path
12
@@ -136,6 +137,8 @@ def get_macros_and_flags():
136
137
if sys.platform == "win32":
138
define_macros += [("torchvision_EXPORTS", None)]
139
extra_compile_args["cxx"].append("/MP")
140
+ if sysconfig.get_config_var("Py_GIL_DISABLED"):
141
+ extra_compile_args["cxx"].append("-DPy_GIL_DISABLED")
142
143
if DEBUG:
144
extra_compile_args["cxx"].append("-g")
0 commit comments