-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup.py
More file actions
28 lines (27 loc) · 760 Bytes
/
Copy pathsetup.py
File metadata and controls
28 lines (27 loc) · 760 Bytes
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
# ==============================================
# File: setup.py
# ==============================================
from setuptools import setup
from torch.utils.cpp_extension import BuildExtension, CUDAExtension
setup(
name='block_sparse_ext',
version='0.0.1',
author='Your Name',
description='Block-Sparse MatMul Extension',
ext_modules=[
CUDAExtension(
name='block_sparse_ext',
sources=[
'csrc/block_sparse_extension.cpp',
'csrc/block_sparse_kernel.cu'
],
extra_compile_args={
'cxx': ['-O3'],
'nvcc': ['-O3', '-use_fast_math']
}
)
],
cmdclass={
'build_ext': BuildExtension
}
)