setup.py 662 Bytes
Newer Older
jixx's avatar
init  
jixx committed
1
2
3
from setuptools import setup
from torch.utils.cpp_extension import BuildExtension, CUDAExtension

jixx's avatar
jixx committed
4
extra_compile_args = ["-std=c++17"]
jixx's avatar
init  
jixx committed
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

setup(
    name="custom_kernels",
    ext_modules=[
        CUDAExtension(
            name="custom_kernels.fused_bloom_attention_cuda",
            sources=["custom_kernels/fused_bloom_attention_cuda.cu"],
            extra_compile_args=extra_compile_args,
        ),
        CUDAExtension(
            name="custom_kernels.fused_attention_cuda",
            sources=["custom_kernels/fused_attention_cuda.cu"],
            extra_compile_args=extra_compile_args,
        ),
    ],
    cmdclass={"build_ext": BuildExtension},
)