-
Notifications
You must be signed in to change notification settings - Fork 22
/
setup.py
70 lines (60 loc) · 1.93 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
from os import path, listdir
import setuptools
from torch.utils.cpp_extension import BuildExtension, CUDAExtension
def find_sources(root_dir):
sources = []
for file in listdir(root_dir):
_, ext = path.splitext(file)
if ext in [".cpp", ".cu"]:
sources.append(path.join(root_dir, file))
return sources
def make_extension(name, package):
return CUDAExtension(
name="{}.{}._backend".format(package, name),
sources=find_sources(path.join("src", name)),
extra_compile_args={
"cxx": ["-O3"],
"nvcc": ["--expt-extended-lambda"],
},
include_dirs=["include/"],
)
here = path.abspath(path.dirname(__file__))
setuptools.setup(
# Meta-data
name="PanopticBEV",
author="Nikhil Gosala",
author_email="gosalan@cs.uni-freiburg.de",
description="PanopticBEV Model Code",
version="1.0.0",
url="http://panoptic-bev.cs.uni-freiburg.de/",
classifiers=[
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
],
python_requires=">=3, <4",
# Package description
packages=[
"panoptic_bev",
"panoptic_bev.algos",
"panoptic_bev.config",
"panoptic_bev.data",
"panoptic_bev.models",
"panoptic_bev.modules",
"panoptic_bev.modules.heads",
"panoptic_bev.utils",
"panoptic_bev.utils.bbx",
"panoptic_bev.utils.nms",
"panoptic_bev.utils.parallel",
"panoptic_bev.utils.roi_sampling",
],
ext_modules=[
make_extension("nms", "panoptic_bev.utils"),
make_extension("bbx", "panoptic_bev.utils"),
make_extension("roi_sampling", "panoptic_bev.utils")
],
cmdclass={"build_ext": BuildExtension},
include_package_data=True,
)