-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathsetup.py
executable file
·35 lines (32 loc) · 976 Bytes
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
from setuptools import setup
from torch.utils import cpp_extension
import sys
print(sys.argv)
if "--nocompile" in sys.argv:
print("LIGHTCONVPOINT -- PYTHON MODULES")
ext_modules=[]
cmdclass={}
else:
print("LIGHTCONVPOINT -- COMPILING CPP MODULES")
ext_modules=[
cpp_extension.CppExtension(
"lightconvpoint.knn_c_func",
[
"lightconvpoint/src/knn.cxx",
"lightconvpoint/src/knn_bind.cxx",
"lightconvpoint/src/knn_random.cxx",
"lightconvpoint/src/knn_farthest.cxx",
"lightconvpoint/src/knn_convpoint.cxx",
"lightconvpoint/src/knn_quantized.cxx",
],
extra_compile_args=["-fopenmp"],
extra_link_args=["-fopenmp"],
)
]
cmdclass={"build_ext": cpp_extension.BuildExtension}
sys.argv.remove("--compile")
setup(
name="lightconvpoint",
ext_modules=ext_modules,
cmdclass=cmdclass,
)