-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathsetup.py
More file actions
30 lines (26 loc) · 828 Bytes
/
setup.py
File metadata and controls
30 lines (26 loc) · 828 Bytes
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
from pathlib import Path
from setuptools import setup
from torch.utils.cpp_extension import BuildExtension, CppExtension
def main():
curr_dir = Path(__file__).absolute().parent
setup(
ext_modules=[
CppExtension(
name="tglite._c",
sources=[
"lib/bind.cpp",
"lib/cache.cpp",
"lib/dedup.cpp",
"lib/sampler.cpp",
"lib/tcsr.cpp",
"lib/utils.cpp"
],
include_dirs=[curr_dir/"include/"],
extra_compile_args=["-std=c++14", "-fopenmp"],
extra_link_args=["-fopenmp"]
)],
cmdclass={
"build_ext": BuildExtension
})
if __name__ == "__main__":
main()