-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
executable file
·37 lines (36 loc) · 1.32 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
from setuptools import setup
from torch.utils.cpp_extension import BuildExtension, CUDAExtension
import os.path as osp
ROOT = osp.dirname(osp.abspath(__file__))
"""
Install lietorch
"""
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 }
)