-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
31 lines (29 loc) · 914 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
import os
from setuptools import setup
from torch.utils.cpp_extension import CUDAExtension, BuildExtension
os.system('make -j%d' % os.cpu_count())
setup(
name='CustomPyTorchCUDAKernel',
version='1.0.0',
install_requires=['torch'],
packages=['CustomPyTorchCUDAKernel'],
package_dir={'CustomPyTorchCUDAKernel': './'},
ext_modules=[
CUDAExtension(
name='CustomPyTorchCUDAKernelBackend',
include_dirs=['./'],
sources=[
'pybind/bind.cpp',
],
libraries=['make_pytorch'],
library_dirs=['objs'],
)
],
cmdclass={'build_ext': BuildExtension},
author='Aaron Cody',
author_email='[email protected]',
description='Custom PyTorch CUDA Extension',
keywords='PyTorch CUDA Extension',
url='https://github.com/miramar-labs/cuda-torch-custom-kernel',
zip_safe=False,
)