"torchvision/models/video/r3d.py" did not exist on "4886ccc84b3ce5b9595abb993747e99801521bea"
setup.py 825 Bytes
Newer Older
jixx's avatar
init  
jixx committed
1
2
3
4
from setuptools import setup
from torch.utils.cpp_extension import BuildExtension, CUDAExtension
import torch

jixx's avatar
jixx committed
5
6
7
8
9
extra_cuda_cflags = ["-lineinfo", "-O3"]
extra_cflags = []
if torch.version.hip:
    extra_cflags = ["-DLEGACY_HIPBLAS_DIRECT=ON"]
    extra_cuda_cflags += ["-DHIPBLAS_USE_HIP_HALF", "-DLEGACY_HIPBLAS_DIRECT=ON"]
jixx's avatar
init  
jixx committed
10

jixx's avatar
jixx committed
11
12
13
extra_compile_args = {
    "cxx": extra_cflags,
    "nvcc": extra_cuda_cflags,
jixx's avatar
init  
jixx committed
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
}

setup(
    name="exllamav2_kernels",
    ext_modules=[
        CUDAExtension(
            name="exllamav2_kernels",
            sources=[
                "exllamav2_kernels/ext.cpp",
                "exllamav2_kernels/cuda/q_matrix.cu",
                "exllamav2_kernels/cuda/q_gemm.cu",
            ],
            extra_compile_args=extra_compile_args,
        )
    ],
    cmdclass={"build_ext": BuildExtension},
)