-
Notifications
You must be signed in to change notification settings - Fork 40
/
Copy pathsetup.py
77 lines (73 loc) · 2.26 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
from setuptools import setup, find_packages
import pathlib
from torch.utils.cpp_extension import BuildExtension, CUDAExtension
from build_helper import check_cuda_version
assert(check_cuda_version())
import os
os.system('make -j%d' % os.cpu_count())
here = pathlib.Path(__file__).parent.resolve()
long_description = (here / 'README.md').read_text(encoding='utf-8')
setup(
name='nnieqat',
version='0.1.0',
description='A nnie quantization aware training tool on pytorch.',
long_description=long_description,
long_description_content_type='text/markdown',
url='https://github.com/aovoc/nnieqat-pytorch',
author='Minqin Chen',
author_email='minqinchen@deepglint.com',
license='MIT',
classifiers=[
'Development Status :: 5 - Production/Stable',
"Intended Audience :: Science/Research",
'Intended Audience :: Developers',
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Software Development :: Libraries :: Python Modules",
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3 :: Only',
],
keywords=[
"quantization aware training",
"deep learning",
"neural network",
"CNN",
"machine learning",
],
packages=find_packages(),
package_data={
"nnieqat": ["gpu/lib/*gfpq*"],
},
python_requires='>=3.5, <4',
install_requires=[
"torch>=1.5",
"numba>=0.42.0",
"numpy>=1.18.1"
],
extras_require={
'test': ["torchvision>=0.4",
"nose",
"ddt"
],
'docs': [
'sphinx==2.4.4',
'sphinx_rtd_theme'
]
},
ext_modules=[
CUDAExtension(
name="quant_impl",
sources=[
"./src/fake_quantize.cpp",
],
libraries=['quant_impl'],
library_dirs=['obj'],
)
],
cmdclass={'build_ext': BuildExtension},
test_suite="nnieqat.test.test_cifar10",
)