Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions extension_cpp/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
torch
numpy
packaging
6 changes: 2 additions & 4 deletions extension_cpp/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import glob

from setuptools import find_packages, setup
from packaging.version import Version

from torch.utils.cpp_extension import (
CppExtension,
Expand All @@ -18,10 +19,7 @@

library_name = "extension_cpp"

if torch.__version__ >= "2.6.0":
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From PR description, are you saying this check is evaluating to false when you install pytorch 2.10? I'm surprised to hear that

py_limited_api = True
else:
py_limited_api = False
py_limited_api = Version(torch.__version__) >= Version("2.6.0")


def get_extensions():
Expand Down
1 change: 1 addition & 0 deletions extension_cpp_stable/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
torch
numpy
packaging
6 changes: 2 additions & 4 deletions extension_cpp_stable/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import glob

from setuptools import find_packages, setup
from packaging.version import Version

from torch.utils.cpp_extension import (
CppExtension,
Expand All @@ -19,10 +20,7 @@
library_name = "extension_cpp_stable"


if torch.__version__ >= "2.6.0":
py_limited_api = True
else:
py_limited_api = False
py_limited_api = Version(torch.__version__) >= Version("2.6.0")


def get_extensions():
Expand Down
Loading