-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
32 lines (27 loc) · 911 Bytes
/
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
#!/usr/bin/env python
import os
import sys
from setuptools import setup, find_packages
from torch.utils import cpp_extension
project_root = os.path.realpath(os.path.dirname(__file__))
include_dirs = [project_root]
ext_module = cpp_extension.CUDAExtension(
'diffractive_cpp',
[
'diffractive/cpp/dense_real_linear.cpp',
'diffractive/cpp/dense_real_linear_kernels.cpp',
'diffractive/cpp/dense_real_linear_kernels_cuda.cu',
'diffractive/cpp/dense_complex_linear.cpp',
'diffractive/cpp/dense_complex_linear_kernels.cpp',
'diffractive/cpp/dense_complex_linear_kernels_cuda.cu',
'diffractive/cpp/vtk.cpp',
'diffractive/cpp/shift_center.cpp',
'diffractive/cpp/main.cpp'
],
include_dirs=include_dirs
)
setup(
name='diffractive_cpp',
ext_modules=[ext_module],
cmdclass={'build_ext': cpp_extension.BuildExtension},
)