-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
64 lines (62 loc) · 1.75 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
from setuptools import setup, Extension, find_packages
from Cython.Build import cythonize
import numpy
ext_modules = [
Extension(
"cgrad.tensor",
sources=[
'cgrad/tensor.pyx',
'cgrad/tensor_ops/tensor.c',
'cgrad/gemm/matmulNd.c',
],
include_dirs=[numpy.get_include()],
extra_compile_args=["-O2"]
),
Extension(
"cgrad.optium.basic_ops",
sources=[
'cgrad/optium/basic_ops.pyx',
'cgrad/optium/tensor_ops.c',
],
include_dirs=[numpy.get_include()],
extra_compile_args=["-O3"]
),
Extension(
"cgrad.autograd.grad_funcs",
sources=[
'cgrad/autograd/grad_funcs.pyx',
],
include_dirs=[numpy.get_include()],
extra_compile_args=["-O2"]
),
Extension(
"cgrad.autograd.graph",
sources=[
'cgrad/autograd/graph.pyx'
],
include_dirs=[numpy.get_include()],
extra_compile_args=["-O2"]
)
]
setup(
name="cgrad",
version="0.0.3",
description="A Cython-based tensor and autograd library",
long_description=open('README.md', encoding='utf-8').read(),
long_description_content_type='text/markdown',
author="Ruhaan",
author_email="[email protected]",
url="https://github.com/Ruhaan838/CGrad",
ext_modules=cythonize(ext_modules),
license="MIT",
install_requires=["numpy","cython"],
package_dir={'': '.'},
packages=find_packages(),
package_data={
'cgrad.Tensor':['cgrad/tensor.pyi'],
'cgrad':['cgrad/optium/basic_ops.pyi'],
'cgrad.Autograd':['cgrad/autograd/grad_funcs.pyi']
},
include_package_data=True,
zip_safe=False
)