Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[hotfix] fix include path #50

Merged
merged 1 commit into from
Nov 13, 2024
Merged
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
10 changes: 8 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ def check_uring_compatibility():
kernel_version = version.parse(uname_info.release.split("-")[0])
return kernel_version >= version.parse("5.10")


def check_pthread_compatibility():
uname_info = uname()
if uname_info.system != "Linux":
Expand All @@ -39,7 +40,7 @@ def check_pthread_compatibility():
if os.environ.get("DISABLE_AIO") == "1":
enable_aio = False
if os.environ.get("DISABLE_PTHREAD") == "1" or not check_pthread_compatibility():
enable_pthread=False
enable_pthread = False

assert enable_aio or enable_uring or enable_pthread
if os.environ.get("WITH_ROOT") == "1":
Expand All @@ -65,7 +66,12 @@ def check_pthread_compatibility():


def cpp_ext_helper(name, sources, **kwargs):
from torch.utils.cpp_extension import CppExtension
from torch.utils.cpp_extension import CUDA_HOME, CppExtension

extra_include_dirs = []

if CUDA_HOME is not None:
extra_include_dirs.append(os.path.join(CUDA_HOME, "include"))

extra_include_dirs = []
if "C_INCLUDE_PATH" in os.environ:
Expand Down