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

extra_compile_args = ["-std=c++17"]
5
6
7
8
9
10
11

setup(
    name="custom_kernels",
    ext_modules=[
        CUDAExtension(
            name="custom_kernels.fused_bloom_attention_cuda",
            sources=["custom_kernels/fused_bloom_attention_cuda.cu"],
fxmarty's avatar
fxmarty committed
12
            extra_compile_args=extra_compile_args,
13
14
15
16
        ),
        CUDAExtension(
            name="custom_kernels.fused_attention_cuda",
            sources=["custom_kernels/fused_attention_cuda.cu"],
fxmarty's avatar
fxmarty committed
17
            extra_compile_args=extra_compile_args,
18
19
20
21
        ),
    ],
    cmdclass={"build_ext": BuildExtension},
)