-
Notifications
You must be signed in to change notification settings - Fork 83
/
Copy pathsetup.py
30 lines (25 loc) · 802 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
#!/usr/bin/env python3
import os
import torch
from setuptools import setup
from torch.utils.cpp_extension import BuildExtension, CUDAExtension
cxx_args = ['-std=c++11']
nvcc_args = [
#'-gencode', 'arch=compute_50,code=sm_50',
#'-gencode', 'arch=compute_52,code=sm_52',
'-gencode', 'arch=compute_60,code=sm_60',
'-gencode', 'arch=compute_61,code=sm_61',
'-gencode', 'arch=compute_70,code=sm_70',
'-gencode', 'arch=compute_70,code=compute_70'
]
setup(
name='local_attn_reshape_cuda',
ext_modules=[
CUDAExtension('local_attn_reshape_cuda', [
'local_attn_reshape_cuda.cc',
'local_attn_reshape_kernel.cu'
], extra_compile_args={'cxx': cxx_args, 'nvcc': nvcc_args})
],
cmdclass={
'build_ext': BuildExtension
})