-
Notifications
You must be signed in to change notification settings - Fork 8
/
setup.py
40 lines (33 loc) · 983 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
35
36
37
38
39
40
import glob
import os
import torch
from setuptools import find_packages, setup
from torch.utils.cpp_extension import BuildExtension, CUDAExtension
rootdir = os.path.dirname(os.path.realpath(__file__))
version = "0.0.1"
ext_modules = []
cutlass_path = f"{rootdir}/third_party/cutlass/include"
sources = glob.glob("protoquant/src/**/*.cu", recursive=True)
sources += glob.glob("protoquant/src/**/*.cpp", recursive=True)
ext = CUDAExtension(
"protoquant._C",
sorted(sources),
extra_compile_args=["-I", rootdir, "-I", cutlass_path],
)
ext_modules = [ext]
packages = find_packages(exclude=("test",))
package_name = "protoquant"
setup(
name=package_name,
version=version,
description="",
long_description="",
classifiers=[],
packages=packages,
package_data={package_name: ["*.so"]},
install_requires=["triton"],
include_package_data=True,
zip_safe=False,
ext_modules=ext_modules,
cmdclass={"build_ext": BuildExtension},
)