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 156bb4b commit 0dd3d29Copy full SHA for 0dd3d29
setup.py
@@ -20,7 +20,11 @@
20
21
library_name = "extension_cpp"
22
23
-# Configure Py_LIMITED_API based on PyTorch version
+# NOTE: PyTorch versions < 2.6 use torch.extension.h which depends on pybind11,
24
+# and pybind11 requires full access to Python's C API (including internal
25
+# structures like PyObject). This makes it incompatible with Py_LIMITED_API
26
+# which restricts access to only stable Python C API symbols.
27
+# For Py_LIMITED_API compatibility, use torch.library.h instead (PyTorch 2.6+).
28
if torch.__version__ >= "2.6.0":
29
py_limited_api = True
30
else:
0 commit comments