-
Notifications
You must be signed in to change notification settings - Fork 305
/
setup.py
61 lines (58 loc) · 2.17 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
from setuptools import setup
from torch.utils.cpp_extension import BuildExtension, CUDAExtension
import os.path as osp
ROOT = osp.dirname(osp.abspath(__file__))
setup(
name='droid_backends',
ext_modules=[
CUDAExtension('droid_backends',
include_dirs=[osp.join(ROOT, 'thirdparty/eigen')],
sources=[
'src/droid.cpp',
'src/droid_kernels.cu',
'src/correlation_kernels.cu',
'src/altcorr_kernel.cu',
],
extra_compile_args={
'cxx': ['-O3'],
'nvcc': ['-O3',
'-gencode=arch=compute_60,code=sm_60',
'-gencode=arch=compute_61,code=sm_61',
'-gencode=arch=compute_70,code=sm_70',
'-gencode=arch=compute_75,code=sm_75',
'-gencode=arch=compute_80,code=sm_80',
'-gencode=arch=compute_86,code=sm_86',
]
}),
],
cmdclass={ 'build_ext' : BuildExtension }
)
setup(
name='lietorch',
version='0.2',
description='Lie Groups for PyTorch',
packages=['lietorch'],
package_dir={'': 'thirdparty/lietorch'},
ext_modules=[
CUDAExtension('lietorch_backends',
include_dirs=[
osp.join(ROOT, 'thirdparty/lietorch/lietorch/include'),
osp.join(ROOT, 'thirdparty/eigen')],
sources=[
'thirdparty/lietorch/lietorch/src/lietorch.cpp',
'thirdparty/lietorch/lietorch/src/lietorch_gpu.cu',
'thirdparty/lietorch/lietorch/src/lietorch_cpu.cpp'],
extra_compile_args={
'cxx': ['-O2'],
'nvcc': ['-O2',
'-gencode=arch=compute_60,code=sm_60',
'-gencode=arch=compute_61,code=sm_61',
'-gencode=arch=compute_70,code=sm_70',
'-gencode=arch=compute_75,code=sm_75',
'-gencode=arch=compute_80,code=sm_80',
'-gencode=arch=compute_86,code=sm_86',
]
}),
],
cmdclass={ 'build_ext' : BuildExtension }
)