-
Notifications
You must be signed in to change notification settings - Fork 2
/
setup.py
52 lines (47 loc) · 1.39 KB
/
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# Copyright (c) 2024-present, Royal Bank of Canada.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
import os
import torch
from setuptools import find_packages, setup
from torch.torch_version import Version
from torch.utils.cpp_extension import BuildExtension, CUDAExtension
NEUZIP_VERSION = "0.1.1"
setup(
name="neuzip",
ext_modules=[
CUDAExtension(
name="neuzip._cuda",
sources=[
"cuda/neuzip.cu",
],
include_dirs=[
os.path.dirname(os.path.abspath(__file__)),
os.path.join(os.path.dirname(os.path.abspath(__file__)), "cuda"),
],
libraries=["nvcomp"],
extra_compile_args=[
"-w",
"-O3",
f"-D_GLIBCXX_USE_CXX11_ABI={int(torch._C._GLIBCXX_USE_CXX11_ABI)}",
],
),
],
install_requires=[
"torch",
"transformers",
"numpy",
f"nvidia-nvcomp-cu{Version(torch.version.cuda).major}",
],
packages=find_packages(),
package_data={
"neuzip._cuda": ["*.cuh", "*.cu"],
},
include_package_data=True,
url="https://github.com/BorealisAI/neuzip",
license="CC BY-NC-SA 4.0",
version=NEUZIP_VERSION,
cmdclass={"build_ext": BuildExtension},
)