-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathsetup.py
39 lines (36 loc) · 1.44 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, find_packages, Extension
import subprocess
subprocess.run(["pip install pybind11"], shell=True)
proc = subprocess.Popen(["python3 -m pybind11 --includes"], stdout=subprocess.PIPE, shell=True)
(out, err) = proc.communicate()
out = out.decode('ascii').strip().split()
setup(
name='sparseprop',
version='0.1.14',
description='SparseProp: Efficient Sparse Backpropagation for Faster Training of Neural Networks',
url='https://github.com/IST-DASLab/sparseprop',
author='Mahdi Nikdan, Tommaso Pegolotti, Eugenia Iofinova, Eldar Kurtic, Dan Alistarh',
author_email='[email protected], [email protected], [email protected], [email protected], [email protected]',
license='Apache License 2.0',
packages=find_packages(exclude=['tests', 'tests.*']),
ext_modules=[Extension(
'backend',
[
'sparseprop/backend.cpp',
],
extra_compile_args=['-O3', '-Wall', '-shared', '-std=c++11', '-fPIC', *out, '-march=native', '-fopenmp', '-ffast-math'],
extra_link_args=['-lgomp']
)],
install_requires=[
'setuptools>=59.0',
'pybind11>=2.0.0',
'scipy',
],
include_package_data=True,
classifiers=[
"Programming Language :: C++",
"Programming Language :: Python :: 3",
"License :: OSI Approved :: Apache Software License",
"Operating System :: POSIX :: Linux",
],
)