-
Notifications
You must be signed in to change notification settings - Fork 8
/
setup.py
42 lines (39 loc) · 1.2 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
from setuptools import setup, find_packages
from torch.utils.cpp_extension import BuildExtension, CUDAExtension
NVCC_ARGS = [
'-D__CUDA_NO_HALF_OPERATORS__',
'-D__CUDA_NO_HALF_CONVERSIONS__',
'-D__CUDA_NO_HALF2_OPERATORS__',
]
setup(
name='carafe',
version='0.0.1',
license='MIT',
ext_modules=[
CUDAExtension(
'carafe_ext', [
'carafe/src/cuda/carafe_cuda.cpp',
'carafe/src/cuda/carafe_cuda_kernel.cu',
'carafe/src/carafe_ext.cpp'
],
define_macros=[('WITH_CUDA', None)],
extra_compile_args={
'cxx': [],
'nvcc': NVCC_ARGS
}),
CUDAExtension(
'carafe_naive_ext', [
'carafe/src/cuda/carafe_naive_cuda.cpp',
'carafe/src/cuda/carafe_naive_cuda_kernel.cu',
'carafe/src/carafe_naive_ext.cpp'
],
define_macros=[('WITH_CUDA', None)],
extra_compile_args={
'cxx': [],
'nvcc': NVCC_ARGS
})
],
packages=find_packages(exclude=('test', )),
cmdclass={'build_ext': BuildExtension},
zip_safe=False,
)