-
Notifications
You must be signed in to change notification settings - Fork 2
/
setup.py
51 lines (46 loc) · 1.54 KB
/
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
import os
from setuptools import setup
from torch.utils.cpp_extension import BuildExtension, CUDAExtension
def make_cuda_ext(name, module, sources):
cuda_ext = CUDAExtension(
name="%s.%s" % (module, name),
sources=[os.path.join(*module.split("."), src) for src in sources],
)
return cuda_ext
if __name__ == "__main__":
setup(
name="BiTrack",
cmdclass={
"build_ext": BuildExtension,
},
ext_modules=[
make_cuda_ext(
name="iou3d_nms_cuda",
module="detection.voxel_rcnn.iou3d_nms",
sources=[
"src/iou3d_nms_api.cpp",
"src/iou3d_nms.cpp",
"src/iou3d_nms_kernel.cu",
],
),
make_cuda_ext(
name="pointnet2_stack_cuda",
module="detection.voxel_rcnn.pointnet2_stack",
sources=[
"src/pointnet2_api.cpp",
"src/ball_query.cpp",
"src/ball_query_gpu.cu",
"src/group_points.cpp",
"src/group_points_gpu.cu",
"src/sampling.cpp",
"src/sampling_gpu.cu",
"src/interpolate.cpp",
"src/interpolate_gpu.cu",
"src/voxel_query.cpp",
"src/voxel_query_gpu.cu",
"src/vector_pool.cpp",
"src/vector_pool_gpu.cu",
],
),
],
)