-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.py
34 lines (32 loc) · 946 Bytes
/
setup.py
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
31
32
33
34
from setuptools import setup, Extension
from torch.utils import cpp_extension
setup(
name = 'torchac_cuda',
version = '0.2.5',
description = 'GPU based arithmetic coding for LLM KV compression',
author = 'Yihua Cheng',
author_email = '[email protected]',
include_package_data = True,
ext_modules=[
cpp_extension.CUDAExtension(
'torchac_cuda',
[
'main.cpp',
'torchac_kernel_enc_new.cu',
'torchac_kernel_dec_new.cu',
'cal_cdf.cu',
],
extra_compile_args={
#'cxx': ['-static-libgcc', '-static-libstdc++'],
#'nvcc': ['--compiler-options', "'-fPIC'"]
},
include_dirs=['./include']
),
],
cmdclass={
'build_ext': cpp_extension.BuildExtension
},
install_requires = [
"torch >= 2.1.0",
]
)