da4ml 0.1.0__py3-none-any.whl → 0.1.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of da4ml might be problematic. Click here for more details.
- da4ml/_version.py +9 -4
- da4ml/cmvm/__init__.py +1 -1
- da4ml/cmvm/api.py +1 -1
- da4ml/cmvm/cmvm.py +10 -10
- {da4ml-0.1.0.dist-info → da4ml-0.1.1.dist-info}/METADATA +3 -1
- {da4ml-0.1.0.dist-info → da4ml-0.1.1.dist-info}/RECORD +9 -9
- {da4ml-0.1.0.dist-info → da4ml-0.1.1.dist-info}/WHEEL +1 -1
- {da4ml-0.1.0.dist-info → da4ml-0.1.1.dist-info}/LICENSE +0 -0
- {da4ml-0.1.0.dist-info → da4ml-0.1.1.dist-info}/top_level.txt +0 -0
da4ml/_version.py
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
|
-
# file generated by
|
|
1
|
+
# file generated by setuptools-scm
|
|
2
2
|
# don't change, don't track in version control
|
|
3
|
+
|
|
4
|
+
__all__ = ["__version__", "__version_tuple__", "version", "version_tuple"]
|
|
5
|
+
|
|
3
6
|
TYPE_CHECKING = False
|
|
4
7
|
if TYPE_CHECKING:
|
|
5
|
-
from typing import Tuple
|
|
8
|
+
from typing import Tuple
|
|
9
|
+
from typing import Union
|
|
10
|
+
|
|
6
11
|
VERSION_TUPLE = Tuple[Union[int, str], ...]
|
|
7
12
|
else:
|
|
8
13
|
VERSION_TUPLE = object
|
|
@@ -12,5 +17,5 @@ __version__: str
|
|
|
12
17
|
__version_tuple__: VERSION_TUPLE
|
|
13
18
|
version_tuple: VERSION_TUPLE
|
|
14
19
|
|
|
15
|
-
__version__ = version = '0.1.
|
|
16
|
-
__version_tuple__ = version_tuple = (0, 1,
|
|
20
|
+
__version__ = version = '0.1.1'
|
|
21
|
+
__version_tuple__ = version_tuple = (0, 1, 1)
|
da4ml/cmvm/__init__.py
CHANGED
da4ml/cmvm/api.py
CHANGED
|
@@ -45,7 +45,7 @@ def fn_from_kernel(
|
|
|
45
45
|
n_beams : int, optional
|
|
46
46
|
Number of beams to use in beam search. Defaults to 1. (Currently disabled!)
|
|
47
47
|
dc : int | None, optional
|
|
48
|
-
Delay constraint. Not implemented yet. Defaults to None.
|
|
48
|
+
Delay constraint. Not (properly) implemented yet. Defaults to None.
|
|
49
49
|
n_inp_max : int, optional
|
|
50
50
|
Number of inputs to process in one block. Defaults to -1 (no limit). Decrease to improve performance, but result will be less optimal.
|
|
51
51
|
n_out_max : int, optional
|
da4ml/cmvm/cmvm.py
CHANGED
|
@@ -22,16 +22,6 @@ def extract_pairs(
|
|
|
22
22
|
_stat = np.zeros((d_in, d_in, n_bit, 2), dtype=np.int64)
|
|
23
23
|
process_locs = np.zeros((d_in, d_out), dtype=np.bool_)
|
|
24
24
|
|
|
25
|
-
if dc is not None:
|
|
26
|
-
depths = np.zeros(d_in, dtype=np.int64)
|
|
27
|
-
for pos in range(d_in):
|
|
28
|
-
depths[pos] = precisions[pos]._depth
|
|
29
|
-
depth_min = np.min(depths)
|
|
30
|
-
mask = depths <= depth_min + dc
|
|
31
|
-
if np.count_nonzero(mask) >= 2:
|
|
32
|
-
for n in range(d_out):
|
|
33
|
-
process_locs[:, n] = mask
|
|
34
|
-
|
|
35
25
|
if updated is not None:
|
|
36
26
|
for i in range(len(updated)):
|
|
37
27
|
pos = updated[i]
|
|
@@ -43,6 +33,16 @@ def extract_pairs(
|
|
|
43
33
|
if np.any(csd[pos][n]) and precisions[pos].b != 0:
|
|
44
34
|
process_locs[pos, n] = True
|
|
45
35
|
|
|
36
|
+
if dc is not None:
|
|
37
|
+
depths = np.zeros(d_in, dtype=np.int64)
|
|
38
|
+
for pos in range(d_in):
|
|
39
|
+
depths[pos] = precisions[pos]._depth
|
|
40
|
+
depth_min = np.min(depths)
|
|
41
|
+
mask = depths <= depth_min + dc
|
|
42
|
+
if np.count_nonzero(mask) >= 2:
|
|
43
|
+
for n in range(d_out):
|
|
44
|
+
process_locs[:, n] &= mask
|
|
45
|
+
|
|
46
46
|
args: list[tuple[int, int, int]] = []
|
|
47
47
|
for pos0 in range(d_in):
|
|
48
48
|
for pos1 in range(d_in):
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: da4ml
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.1
|
|
4
4
|
Summary: Digital Arithmetic for Machine Learning
|
|
5
5
|
Author-email: Chang Sun <chsun@cern.ch>
|
|
6
6
|
License: GNU Lesser General Public License v3 (LGPLv3)
|
|
@@ -17,6 +17,8 @@ Classifier: Programming Language :: Python :: 3.13
|
|
|
17
17
|
Requires-Python: >=3.10
|
|
18
18
|
Description-Content-Type: text/markdown
|
|
19
19
|
License-File: LICENSE
|
|
20
|
+
Requires-Dist: llvmlite>=0.43
|
|
21
|
+
Requires-Dist: numba>=0.60
|
|
20
22
|
|
|
21
23
|
# da4ml: Distributed Arithmetic for Machine Learning
|
|
22
24
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
da4ml/__init__.py,sha256=kkpf91aU4n9MMsX63Me90mo_0JSQyU3N-vhgTIrjkT0,437
|
|
2
|
-
da4ml/_version.py,sha256=
|
|
3
|
-
da4ml/cmvm/__init__.py,sha256=
|
|
4
|
-
da4ml/cmvm/api.py,sha256=
|
|
2
|
+
da4ml/_version.py,sha256=Mmxse1R0ki5tjz9qzU8AQyqUsLt8nTyCAbYQp8R87PU,511
|
|
3
|
+
da4ml/cmvm/__init__.py,sha256=UUnJxtZGQpqVWKT_djuPr7CqyiWlUrmKoyAvH7f4-q8,848
|
|
4
|
+
da4ml/cmvm/api.py,sha256=G7YZ1n32EaYzsahSUwB-0vvRZt1Q11idShhn735vDCM,3461
|
|
5
5
|
da4ml/cmvm/balanced_reduction.py,sha256=fDKaRIY4WkRo3s5dGWeWmylDgjMD-hr1-tpdwu7EL6Y,1533
|
|
6
|
-
da4ml/cmvm/cmvm.py,sha256=
|
|
6
|
+
da4ml/cmvm/cmvm.py,sha256=dKKg6Vn256wT91jwLCph7FqZeJSFUewyCvYzR3WcK7I,10537
|
|
7
7
|
da4ml/cmvm/codegen.py,sha256=w_1xR36Oxwb-1XivFwjQ_n2uRw-abjwzjOhwARg_93k,6088
|
|
8
8
|
da4ml/cmvm/csd.py,sha256=k-9k0CigqnvyrgtXzBvKLZ32FdwWUE_EhAlXkK6Mlxk,1988
|
|
9
9
|
da4ml/cmvm/fixed_variable.py,sha256=APPT2EN7hOwjHIaD5JdOpd7riGUpmtXUJ6QaAnE1cjw,5753
|
|
@@ -11,8 +11,8 @@ da4ml/cmvm/graph_compile.py,sha256=bODuY7DAi-9L-ZleAzK0szZDrEH4Ljq2ocINUHXD588,3
|
|
|
11
11
|
da4ml/cmvm/nb_fixed_precision.py,sha256=M2bnflNNOGLgUsI0QGlF2noT5ZJD-2bU2dZ3lw8GZvM,2457
|
|
12
12
|
da4ml/cmvm/scoring.py,sha256=EUREpoyQHUe-vpRat_JjRD73uQhD0dOhnG2D3opazwQ,1375
|
|
13
13
|
da4ml/cmvm/utils.py,sha256=Svp82TOtpNOtKfXlCkijq7DBSbMEqyWoY2PAYVhXXQY,288
|
|
14
|
-
da4ml-0.1.
|
|
15
|
-
da4ml-0.1.
|
|
16
|
-
da4ml-0.1.
|
|
17
|
-
da4ml-0.1.
|
|
18
|
-
da4ml-0.1.
|
|
14
|
+
da4ml-0.1.1.dist-info/LICENSE,sha256=46mU2C5kSwOnkqkw9XQAJlhBL2JAf1_uCD8lVcXyMRg,7652
|
|
15
|
+
da4ml-0.1.1.dist-info/METADATA,sha256=_UXGTAL45iIybPsNfjyQpLOjdIEeRVIkm76mw8Nb1cg,5485
|
|
16
|
+
da4ml-0.1.1.dist-info/WHEEL,sha256=jB7zZ3N9hIM9adW7qlTAyycLYW9npaWKLRzaoVcLKcM,91
|
|
17
|
+
da4ml-0.1.1.dist-info/top_level.txt,sha256=N0tnKVwRqFiffFdeAzCgFq71hUNySh5-ITbNd6-R58Q,6
|
|
18
|
+
da4ml-0.1.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|