-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
40 lines (33 loc) · 1.21 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
from setuptools import setup
import os
# import glob
from torch.utils.cpp_extension import BuildExtension, CppExtension, CUDAExtension
# import subprocess
# def get_git_commit_number():
# if not os.path.exists('.git'):
# return '0000000'
# cmd_out = subprocess.run(['git', 'rev-parse', 'HEAD'], stdout=subprocess.PIPE)
# git_commit_number = cmd_out.stdout.decode('utf-8')[:7]
# return git_commit_number
if __name__ == '__main__':
include_dirs = os.path.dirname(os.path.abspath(__file__))
# include_dirs = os.path.join(include_dirs, "innnn")
# version = '0.1.0+%s' % get_git_commit_number()
# source_cpu = glob.glob(os.path.join(include_dirs, 'gpu', '*.cpp', "*.cu"))
setup(
name='tril_devox_gpu',
version="0.1",
author='Jie Wang',
author_email='[email protected]',
ext_modules=[
CUDAExtension(
name = 'ops.tri_op_cuda',
sources=["ops/src/tril_api.cpp",
"ops/src/trillnear_devox_diff_R.cpp",
"ops/src/trillnear_devox_diff_R_cuda.cu"],
include_dirs=[include_dirs]),
],
cmdclass={
'build_ext': BuildExtension
}
)