Skip to content

Commit 5293a93

Browse files
committed
create include folder
1 parent 77e607a commit 5293a93

File tree

8 files changed

+13
-12
lines changed

8 files changed

+13
-12
lines changed

gsplat/cuda/_backend.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def cuda_toolkit_version():
8989
current_dir = os.path.dirname(os.path.abspath(__file__))
9090
glm_path = os.path.join(current_dir, "csrc", "third_party", "glm")
9191

92-
extra_include_paths = [os.path.join(PATH, "csrc/"), glm_path]
92+
extra_include_paths = [os.path.join(PATH, "include/"), glm_path]
9393
extra_cflags = ["-O3"]
9494
if NO_FAST_MATH:
9595
extra_cuda_cflags = ["-O3"]
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

setup.py

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ def get_extensions():
3434
from torch.__config__ import parallel_info
3535
from torch.utils.cpp_extension import CUDAExtension
3636

37-
extensions_dir_v2 = osp.join("gsplat", "cuda", "csrc")
38-
sources_v2 = glob.glob(osp.join(extensions_dir_v2, "*.cu")) + glob.glob(
39-
osp.join(extensions_dir_v2, "*.cpp")
37+
extensions_dir = osp.join("gsplat", "cuda")
38+
sources = glob.glob(osp.join(extensions_dir, "csrc", "*.cu")) + glob.glob(
39+
osp.join(extensions_dir, "csrc", "*.cpp")
4040
)
41-
sources_v2 = [path for path in sources_v2 if "hip" not in path]
41+
sources = [path for path in sources if "hip" not in path]
4242

4343
undef_macros = []
4444
define_macros = []
@@ -90,18 +90,19 @@ def get_extensions():
9090
extra_compile_args["nvcc"] += ["-DWIN32_LEAN_AND_MEAN"]
9191

9292
current_dir = pathlib.Path(__file__).parent.resolve()
93-
glm_path = os.path.join(current_dir, "gsplat", "cuda", "csrc", "third_party", "glm")
94-
extension_v2 = CUDAExtension(
93+
glm_path = osp.join(current_dir, "gsplat", "cuda", "csrc", "third_party", "glm")
94+
include_dirs = [glm_path, osp.join(current_dir, "gsplat", "cuda", "include")]
95+
96+
extension = CUDAExtension(
9597
"gsplat.csrc",
96-
sources_v2,
97-
include_dirs=[extensions_dir_v2, glm_path], # glm lives in v2.
98+
sources,
99+
include_dirs=include_dirs,
98100
define_macros=define_macros,
99101
undef_macros=undef_macros,
100102
extra_compile_args=extra_compile_args,
101103
extra_link_args=extra_link_args,
102104
)
103-
104-
return [extension_v2]
105+
return [extension]
105106

106107

107108
setup(

0 commit comments

Comments
 (0)