-
Notifications
You must be signed in to change notification settings - Fork 53
/
setup.py
60 lines (51 loc) · 1.96 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
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='lietorch',
version='0.2',
description='Lie Groups for PyTorch',
author='teedrz',
packages=['lietorch'],
ext_modules=[
CUDAExtension('lietorch_backends',
include_dirs=[
osp.join(ROOT, 'lietorch/include'),
osp.join(ROOT, 'eigen')],
sources=[
'lietorch/src/lietorch.cpp',
'lietorch/src/lietorch_gpu.cu',
'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_75,code=compute_75',
]
}),
CUDAExtension('lietorch_extras',
sources=[
'lietorch/extras/altcorr_kernel.cu',
'lietorch/extras/corr_index_kernel.cu',
'lietorch/extras/se3_builder.cu',
'lietorch/extras/se3_inplace_builder.cu',
'lietorch/extras/se3_solver.cu',
'lietorch/extras/extras.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_75,code=compute_75',
]
}),
],
cmdclass={ 'build_ext': BuildExtension }
)