-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
30 lines (30 loc) · 907 Bytes
/
Copy pathsetup.py
File metadata and controls
30 lines (30 loc) · 907 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
29
30
from setuptools import setup, find_packages
from torch.utils.cpp_extension import BuildExtension, CUDAExtension
import os
setup(
name="blackflash",
version="0.1.0",
packages=find_packages(),
ext_modules=[
CUDAExtension(
name="blackflash_cuda",
sources=[
"binding/blackflash_ops.cu",
"kernel/flash_attn_mma.cu",
],
include_dirs=[os.path.join(os.path.dirname(os.path.abspath(__file__)), "include")],
extra_compile_args={
"nvcc": [
"-arch=sm_120",
"-std=c++17",
"-O3",
"--use_fast_math",
"--expt-relaxed-constexpr",
"-lineinfo",
],
},
libraries=["cuda"],
),
],
cmdclass={"build_ext": BuildExtension},
)