-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.py
44 lines (40 loc) · 1.33 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
from setuptools import setup, Extension
from torch.utils import cpp_extension
import os
__version__ = '0.0.1'
CTLDIR = 'ctl/modules/src/'
ext_modules = [
Extension(
'ctl',
[CTLDIR+'img/projectiondata.cpp',
CTLDIR+'img/singleviewdata.cpp',
CTLDIR+'mat/homography.cpp',
CTLDIR+'mat/matrix_algorithm.cpp',
CTLDIR+'mat/projectionmatrix.cpp',
CTLDIR+'ocl/openclconfig.cpp',
CTLDIR+'ocl/cldirfileloader.cpp',
CTLDIR+'processing/radontransform2d.cpp',
'src/'+'radon2d_kernel.cpp',
'src/'+'parallelsetup.cpp',
'src/'+'simple_backprojector_kernel.cpp',
'src/'+'simplebackprojector.cpp',
'src/'+'pybind_radon.cpp'],
include_dirs=[
'include',
CTLDIR,
] + cpp_extension.include_paths(cuda=True),
language='c++',
libraries=['OpenCL', 'c10', 'caffe2', 'torch', 'torch_python', '_C'],
library_dirs=cpp_extension.library_paths(cuda=True),
define_macros=[('OCL_CONFIG_MODULE_AVAILABLE', None), ('NOQT', None)]
),
]
setup(
name='ctl',
version=__version__,
author='Philipp Ernst',
author_email='[email protected]',
description='2D Radon transform using CTL',
ext_modules=ext_modules,
cmdclass={'build_ext': cpp_extension.BuildExtension},
)