da4ml 0.1.0__tar.gz → 0.1.1__tar.gz

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.

Files changed (26) hide show
  1. {da4ml-0.1.0 → da4ml-0.1.1}/PKG-INFO +3 -1
  2. {da4ml-0.1.0 → da4ml-0.1.1}/pyproject.toml +1 -1
  3. {da4ml-0.1.0 → da4ml-0.1.1}/src/da4ml/_version.py +9 -4
  4. {da4ml-0.1.0 → da4ml-0.1.1}/src/da4ml/cmvm/__init__.py +1 -1
  5. {da4ml-0.1.0 → da4ml-0.1.1}/src/da4ml/cmvm/api.py +1 -1
  6. {da4ml-0.1.0 → da4ml-0.1.1}/src/da4ml/cmvm/cmvm.py +10 -10
  7. {da4ml-0.1.0 → da4ml-0.1.1}/src/da4ml.egg-info/PKG-INFO +3 -1
  8. {da4ml-0.1.0 → da4ml-0.1.1}/src/da4ml.egg-info/SOURCES.txt +1 -0
  9. da4ml-0.1.1/src/da4ml.egg-info/requires.txt +2 -0
  10. {da4ml-0.1.0 → da4ml-0.1.1}/.github/workflows/python-publish.yml +0 -0
  11. {da4ml-0.1.0 → da4ml-0.1.1}/.gitignore +0 -0
  12. {da4ml-0.1.0 → da4ml-0.1.1}/.pre-commit-config.yaml +0 -0
  13. {da4ml-0.1.0 → da4ml-0.1.1}/LICENSE +0 -0
  14. {da4ml-0.1.0 → da4ml-0.1.1}/README.md +0 -0
  15. {da4ml-0.1.0 → da4ml-0.1.1}/setup.cfg +0 -0
  16. {da4ml-0.1.0 → da4ml-0.1.1}/src/da4ml/__init__.py +0 -0
  17. {da4ml-0.1.0 → da4ml-0.1.1}/src/da4ml/cmvm/balanced_reduction.py +0 -0
  18. {da4ml-0.1.0 → da4ml-0.1.1}/src/da4ml/cmvm/codegen.py +0 -0
  19. {da4ml-0.1.0 → da4ml-0.1.1}/src/da4ml/cmvm/csd.py +0 -0
  20. {da4ml-0.1.0 → da4ml-0.1.1}/src/da4ml/cmvm/fixed_variable.py +0 -0
  21. {da4ml-0.1.0 → da4ml-0.1.1}/src/da4ml/cmvm/graph_compile.py +0 -0
  22. {da4ml-0.1.0 → da4ml-0.1.1}/src/da4ml/cmvm/nb_fixed_precision.py +0 -0
  23. {da4ml-0.1.0 → da4ml-0.1.1}/src/da4ml/cmvm/scoring.py +0 -0
  24. {da4ml-0.1.0 → da4ml-0.1.1}/src/da4ml/cmvm/utils.py +0 -0
  25. {da4ml-0.1.0 → da4ml-0.1.1}/src/da4ml.egg-info/dependency_links.txt +0 -0
  26. {da4ml-0.1.0 → da4ml-0.1.1}/src/da4ml.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: da4ml
3
- Version: 0.1.0
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
 
@@ -29,7 +29,7 @@ classifiers = [
29
29
  "Programming Language :: Python :: 3.13",
30
30
  ]
31
31
  dynamic = [ "version" ]
32
-
32
+ dependencies = [ "llvmlite>=0.43", "numba>=0.60" ]
33
33
  urls.repository = "https://github.com/calad0i/da4ml"
34
34
 
35
35
  [tool.setuptools]
@@ -1,8 +1,13 @@
1
- # file generated by setuptools_scm
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, Union
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.0'
16
- __version_tuple__ = version_tuple = (0, 1, 0)
20
+ __version__ = version = '0.1.1'
21
+ __version_tuple__ = version_tuple = (0, 1, 1)
@@ -24,7 +24,7 @@ _ = fn_from_kernel(
24
24
  symmetrics=symmetrics,
25
25
  depths=depths,
26
26
  n_beams=1,
27
- dc=0,
27
+ dc=None,
28
28
  n_inp_max=-1,
29
29
  n_out_max=-1,
30
30
  codegen_backend=PyCodegenBackend(),
@@ -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
@@ -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.0
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
 
@@ -9,6 +9,7 @@ src/da4ml/_version.py
9
9
  src/da4ml.egg-info/PKG-INFO
10
10
  src/da4ml.egg-info/SOURCES.txt
11
11
  src/da4ml.egg-info/dependency_links.txt
12
+ src/da4ml.egg-info/requires.txt
12
13
  src/da4ml.egg-info/top_level.txt
13
14
  src/da4ml/cmvm/__init__.py
14
15
  src/da4ml/cmvm/api.py
@@ -0,0 +1,2 @@
1
+ llvmlite>=0.43
2
+ numba>=0.60
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes