-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
23 lines (21 loc) · 686 Bytes
/
setup.py
File metadata and controls
23 lines (21 loc) · 686 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
from setuptools import setup, Extension
from torch.utils import cpp_extension
import sysconfig
# please check this path and make sure it exists
# if not exists, please install python3.x-dev or other related libs
# print(sysconfig.get_paths()['include'])
EXT_SRCS = ['csrc/swish.cc', 'csrc/swish_cuda_kernel.cu']
setup(
name='swish_cpp',
version='0.9.9',
install_requires=['torch>=1.2'],
ext_modules=[cpp_extension.CUDAExtension(
'swish_cpp',
EXT_SRCS,
extra_compile_args={
'cxx': [],
'nvcc': ['--expt-extended-lambda']
},
include_dirs=[]
)],
cmdclass={'build_ext': cpp_extension.BuildExtension})