-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathsetup.py
33 lines (31 loc) · 980 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
import os
from setuptools import setup
from torch.utils.cpp_extension import CUDAExtension, BuildExtension
os.system('make -j%d' % os.cpu_count())
# Python interface
setup(
name='PytorchMakefileTutorial',
version='0.2.0',
install_requires=['torch'],
packages=['MakePytorchPlusPlus'],
package_dir={'MakePytorchPlusPlus': './'},
ext_modules=[
CUDAExtension(
name='MakePytorchBackend',
include_dirs=['./'],
sources=[
'pybind/bind.cpp',
],
libraries=['make_pytorch'],
library_dirs=['objs'],
# extra_compile_args=['-g']
)
],
cmdclass={'build_ext': BuildExtension},
author='Christopher B. Choy',
author_email='[email protected]',
description='Tutorial for Pytorch C++ Extension with a Makefile',
keywords='Pytorch C++ Extension',
url='https://github.com/chrischoy/MakePytorchPlusPlus',
zip_safe=False,
)