da4ml 0.4.0__tar.gz → 0.4.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 (102) hide show
  1. {da4ml-0.4.0/src/da4ml.egg-info → da4ml-0.4.1}/PKG-INFO +1 -1
  2. {da4ml-0.4.0 → da4ml-0.4.1}/src/da4ml/_version.py +3 -3
  3. {da4ml-0.4.0 → da4ml-0.4.1}/src/da4ml/codegen/rtl/rtl_model.py +3 -2
  4. {da4ml-0.4.0 → da4ml-0.4.1}/src/da4ml/converter/hgq2/replica.py +2 -3
  5. {da4ml-0.4.0 → da4ml-0.4.1/src/da4ml.egg-info}/PKG-INFO +1 -1
  6. {da4ml-0.4.0 → da4ml-0.4.1}/.clang-format +0 -0
  7. {da4ml-0.4.0 → da4ml-0.4.1}/.github/workflows/python-publish.yml +0 -0
  8. {da4ml-0.4.0 → da4ml-0.4.1}/.github/workflows/sphinx-build.yml +0 -0
  9. {da4ml-0.4.0 → da4ml-0.4.1}/.gitignore +0 -0
  10. {da4ml-0.4.0 → da4ml-0.4.1}/.pre-commit-config.yaml +0 -0
  11. {da4ml-0.4.0 → da4ml-0.4.1}/LICENSE +0 -0
  12. {da4ml-0.4.0 → da4ml-0.4.1}/README.md +0 -0
  13. {da4ml-0.4.0 → da4ml-0.4.1}/docs/Makefile +0 -0
  14. {da4ml-0.4.0 → da4ml-0.4.1}/docs/_static/example.svg +0 -0
  15. {da4ml-0.4.0 → da4ml-0.4.1}/docs/_static/icon.svg +0 -0
  16. {da4ml-0.4.0 → da4ml-0.4.1}/docs/_static/stage1.svg +0 -0
  17. {da4ml-0.4.0 → da4ml-0.4.1}/docs/_static/stage2.svg +0 -0
  18. {da4ml-0.4.0 → da4ml-0.4.1}/docs/_static/workflow.svg +0 -0
  19. {da4ml-0.4.0 → da4ml-0.4.1}/docs/cmvm.md +0 -0
  20. {da4ml-0.4.0 → da4ml-0.4.1}/docs/conf.py +0 -0
  21. {da4ml-0.4.0 → da4ml-0.4.1}/docs/dais.md +0 -0
  22. {da4ml-0.4.0 → da4ml-0.4.1}/docs/faq.md +0 -0
  23. {da4ml-0.4.0 → da4ml-0.4.1}/docs/getting_started.md +0 -0
  24. {da4ml-0.4.0 → da4ml-0.4.1}/docs/index.rst +0 -0
  25. {da4ml-0.4.0 → da4ml-0.4.1}/docs/install.md +0 -0
  26. {da4ml-0.4.0 → da4ml-0.4.1}/docs/status.md +0 -0
  27. {da4ml-0.4.0 → da4ml-0.4.1}/interperter/DAISInterpreter.cc +0 -0
  28. {da4ml-0.4.0 → da4ml-0.4.1}/interperter/DAISInterpreter.hh +0 -0
  29. {da4ml-0.4.0 → da4ml-0.4.1}/pyproject.toml +0 -0
  30. {da4ml-0.4.0 → da4ml-0.4.1}/setup.cfg +0 -0
  31. {da4ml-0.4.0 → da4ml-0.4.1}/src/da4ml/__init__.py +0 -0
  32. {da4ml-0.4.0 → da4ml-0.4.1}/src/da4ml/cmvm/__init__.py +0 -0
  33. {da4ml-0.4.0 → da4ml-0.4.1}/src/da4ml/cmvm/api.py +0 -0
  34. {da4ml-0.4.0 → da4ml-0.4.1}/src/da4ml/cmvm/core/__init__.py +0 -0
  35. {da4ml-0.4.0 → da4ml-0.4.1}/src/da4ml/cmvm/core/indexers.py +0 -0
  36. {da4ml-0.4.0 → da4ml-0.4.1}/src/da4ml/cmvm/core/state_opr.py +0 -0
  37. {da4ml-0.4.0 → da4ml-0.4.1}/src/da4ml/cmvm/types.py +0 -0
  38. {da4ml-0.4.0 → da4ml-0.4.1}/src/da4ml/cmvm/util/__init__.py +0 -0
  39. {da4ml-0.4.0 → da4ml-0.4.1}/src/da4ml/cmvm/util/bit_decompose.py +0 -0
  40. {da4ml-0.4.0 → da4ml-0.4.1}/src/da4ml/cmvm/util/mat_decompose.py +0 -0
  41. {da4ml-0.4.0 → da4ml-0.4.1}/src/da4ml/codegen/__init__.py +0 -0
  42. {da4ml-0.4.0 → da4ml-0.4.1}/src/da4ml/codegen/hls/__init__.py +0 -0
  43. {da4ml-0.4.0 → da4ml-0.4.1}/src/da4ml/codegen/hls/hls_codegen.py +0 -0
  44. {da4ml-0.4.0 → da4ml-0.4.1}/src/da4ml/codegen/hls/hls_model.py +0 -0
  45. {da4ml-0.4.0 → da4ml-0.4.1}/src/da4ml/codegen/hls/source/ap_types/ap_binary.h +0 -0
  46. {da4ml-0.4.0 → da4ml-0.4.1}/src/da4ml/codegen/hls/source/ap_types/ap_common.h +0 -0
  47. {da4ml-0.4.0 → da4ml-0.4.1}/src/da4ml/codegen/hls/source/ap_types/ap_decl.h +0 -0
  48. {da4ml-0.4.0 → da4ml-0.4.1}/src/da4ml/codegen/hls/source/ap_types/ap_fixed.h +0 -0
  49. {da4ml-0.4.0 → da4ml-0.4.1}/src/da4ml/codegen/hls/source/ap_types/ap_fixed_base.h +0 -0
  50. {da4ml-0.4.0 → da4ml-0.4.1}/src/da4ml/codegen/hls/source/ap_types/ap_fixed_ref.h +0 -0
  51. {da4ml-0.4.0 → da4ml-0.4.1}/src/da4ml/codegen/hls/source/ap_types/ap_fixed_special.h +0 -0
  52. {da4ml-0.4.0 → da4ml-0.4.1}/src/da4ml/codegen/hls/source/ap_types/ap_int.h +0 -0
  53. {da4ml-0.4.0 → da4ml-0.4.1}/src/da4ml/codegen/hls/source/ap_types/ap_int_base.h +0 -0
  54. {da4ml-0.4.0 → da4ml-0.4.1}/src/da4ml/codegen/hls/source/ap_types/ap_int_ref.h +0 -0
  55. {da4ml-0.4.0 → da4ml-0.4.1}/src/da4ml/codegen/hls/source/ap_types/ap_int_special.h +0 -0
  56. {da4ml-0.4.0 → da4ml-0.4.1}/src/da4ml/codegen/hls/source/ap_types/ap_shift_reg.h +0 -0
  57. {da4ml-0.4.0 → da4ml-0.4.1}/src/da4ml/codegen/hls/source/ap_types/etc/ap_private.h +0 -0
  58. {da4ml-0.4.0 → da4ml-0.4.1}/src/da4ml/codegen/hls/source/ap_types/hls_math.h +0 -0
  59. {da4ml-0.4.0 → da4ml-0.4.1}/src/da4ml/codegen/hls/source/ap_types/hls_stream.h +0 -0
  60. {da4ml-0.4.0 → da4ml-0.4.1}/src/da4ml/codegen/hls/source/ap_types/utils/x_hls_utils.h +0 -0
  61. {da4ml-0.4.0 → da4ml-0.4.1}/src/da4ml/codegen/hls/source/binder_util.hh +0 -0
  62. {da4ml-0.4.0 → da4ml-0.4.1}/src/da4ml/codegen/hls/source/build_binder.mk +0 -0
  63. {da4ml-0.4.0 → da4ml-0.4.1}/src/da4ml/codegen/hls/source/vitis_bitshift.hh +0 -0
  64. {da4ml-0.4.0 → da4ml-0.4.1}/src/da4ml/codegen/rtl/__init__.py +0 -0
  65. {da4ml-0.4.0 → da4ml-0.4.1}/src/da4ml/codegen/rtl/common_source/binder_util.hh +0 -0
  66. {da4ml-0.4.0 → da4ml-0.4.1}/src/da4ml/codegen/rtl/common_source/build_binder.mk +0 -0
  67. {da4ml-0.4.0 → da4ml-0.4.1}/src/da4ml/codegen/rtl/common_source/build_prj.tcl +0 -0
  68. {da4ml-0.4.0 → da4ml-0.4.1}/src/da4ml/codegen/rtl/common_source/ioutil.hh +0 -0
  69. {da4ml-0.4.0 → da4ml-0.4.1}/src/da4ml/codegen/rtl/common_source/template.xdc +0 -0
  70. {da4ml-0.4.0 → da4ml-0.4.1}/src/da4ml/codegen/rtl/verilog/__init__.py +0 -0
  71. {da4ml-0.4.0 → da4ml-0.4.1}/src/da4ml/codegen/rtl/verilog/comb.py +0 -0
  72. {da4ml-0.4.0 → da4ml-0.4.1}/src/da4ml/codegen/rtl/verilog/io_wrapper.py +0 -0
  73. {da4ml-0.4.0 → da4ml-0.4.1}/src/da4ml/codegen/rtl/verilog/pipeline.py +0 -0
  74. {da4ml-0.4.0 → da4ml-0.4.1}/src/da4ml/codegen/rtl/verilog/source/multiplier.v +0 -0
  75. {da4ml-0.4.0 → da4ml-0.4.1}/src/da4ml/codegen/rtl/verilog/source/mux.v +0 -0
  76. {da4ml-0.4.0 → da4ml-0.4.1}/src/da4ml/codegen/rtl/verilog/source/negative.v +0 -0
  77. {da4ml-0.4.0 → da4ml-0.4.1}/src/da4ml/codegen/rtl/verilog/source/shift_adder.v +0 -0
  78. {da4ml-0.4.0 → da4ml-0.4.1}/src/da4ml/codegen/rtl/vhdl/__init__.py +0 -0
  79. {da4ml-0.4.0 → da4ml-0.4.1}/src/da4ml/codegen/rtl/vhdl/comb.py +0 -0
  80. {da4ml-0.4.0 → da4ml-0.4.1}/src/da4ml/codegen/rtl/vhdl/io_wrapper.py +0 -0
  81. {da4ml-0.4.0 → da4ml-0.4.1}/src/da4ml/codegen/rtl/vhdl/pipeline.py +0 -0
  82. {da4ml-0.4.0 → da4ml-0.4.1}/src/da4ml/codegen/rtl/vhdl/source/multiplier.vhd +0 -0
  83. {da4ml-0.4.0 → da4ml-0.4.1}/src/da4ml/codegen/rtl/vhdl/source/mux.vhd +0 -0
  84. {da4ml-0.4.0 → da4ml-0.4.1}/src/da4ml/codegen/rtl/vhdl/source/negative.vhd +0 -0
  85. {da4ml-0.4.0 → da4ml-0.4.1}/src/da4ml/codegen/rtl/vhdl/source/shift_adder.vhd +0 -0
  86. {da4ml-0.4.0 → da4ml-0.4.1}/src/da4ml/codegen/rtl/vhdl/source/template.xdc +0 -0
  87. {da4ml-0.4.0 → da4ml-0.4.1}/src/da4ml/converter/__init__.py +0 -0
  88. {da4ml-0.4.0 → da4ml-0.4.1}/src/da4ml/converter/hgq2/__init__.py +0 -0
  89. {da4ml-0.4.0 → da4ml-0.4.1}/src/da4ml/converter/hgq2/parser.py +0 -0
  90. {da4ml-0.4.0 → da4ml-0.4.1}/src/da4ml/trace/__init__.py +0 -0
  91. {da4ml-0.4.0 → da4ml-0.4.1}/src/da4ml/trace/fixed_variable.py +0 -0
  92. {da4ml-0.4.0 → da4ml-0.4.1}/src/da4ml/trace/fixed_variable_array.py +0 -0
  93. {da4ml-0.4.0 → da4ml-0.4.1}/src/da4ml/trace/ops/__init__.py +0 -0
  94. {da4ml-0.4.0 → da4ml-0.4.1}/src/da4ml/trace/ops/conv_utils.py +0 -0
  95. {da4ml-0.4.0 → da4ml-0.4.1}/src/da4ml/trace/ops/einsum_utils.py +0 -0
  96. {da4ml-0.4.0 → da4ml-0.4.1}/src/da4ml/trace/ops/reduce_utils.py +0 -0
  97. {da4ml-0.4.0 → da4ml-0.4.1}/src/da4ml/trace/pipeline.py +0 -0
  98. {da4ml-0.4.0 → da4ml-0.4.1}/src/da4ml/trace/tracer.py +0 -0
  99. {da4ml-0.4.0 → da4ml-0.4.1}/src/da4ml.egg-info/SOURCES.txt +0 -0
  100. {da4ml-0.4.0 → da4ml-0.4.1}/src/da4ml.egg-info/dependency_links.txt +0 -0
  101. {da4ml-0.4.0 → da4ml-0.4.1}/src/da4ml.egg-info/requires.txt +0 -0
  102. {da4ml-0.4.0 → da4ml-0.4.1}/src/da4ml.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: da4ml
3
- Version: 0.4.0
3
+ Version: 0.4.1
4
4
  Summary: Distributed Arithmetic for Machine Learning
5
5
  Author-email: Chang Sun <chsun@cern.ch>
6
6
  License: GNU Lesser General Public License v3 (LGPLv3)
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
28
28
  commit_id: COMMIT_ID
29
29
  __commit_id__: COMMIT_ID
30
30
 
31
- __version__ = version = '0.4.0'
32
- __version_tuple__ = version_tuple = (0, 4, 0)
31
+ __version__ = version = '0.4.1'
32
+ __version_tuple__ = version_tuple = (0, 4, 1)
33
33
 
34
- __commit_id__ = commit_id = 'gb2796d8af'
34
+ __commit_id__ = commit_id = 'g359d5d425'
@@ -85,6 +85,7 @@ class RTLModel:
85
85
  tcl = f.read()
86
86
  tcl = tcl.replace('${DEVICE}', self._part_name)
87
87
  tcl = tcl.replace('${PROJECT_NAME}', self._prj_name)
88
+ tcl = tcl.replace('${SOURCE_TYPE}', flavor)
88
89
  with open(self._path / 'build_prj.tcl', 'w') as f:
89
90
  f.write(tcl)
90
91
 
@@ -94,8 +95,8 @@ class RTLModel:
94
95
  xdc = xdc.replace('${CLOCK_PERIOD}', str(self._clock_period))
95
96
  xdc = xdc.replace('${UNCERTAINITY_SETUP}', str(self._clock_uncertainty))
96
97
  xdc = xdc.replace('${UNCERTAINITY_HOLD}', str(self._clock_uncertainty))
97
- xdc = xdc.replace('${DELAY_MAX}', str(self._io_delay_minmax[0]))
98
- xdc = xdc.replace('${DELAY_MIN}', str(self._io_delay_minmax[1]))
98
+ xdc = xdc.replace('${DELAY_MAX}', str(self._io_delay_minmax[1]))
99
+ xdc = xdc.replace('${DELAY_MIN}', str(self._io_delay_minmax[0]))
99
100
  with open(self._path / f'{self._prj_name}.xdc', 'w') as f:
100
101
  f.write(xdc)
101
102
 
@@ -94,7 +94,6 @@ class ReplayOperationBase(metaclass=ReplayOperationMeta):
94
94
 
95
95
  def __call__(self, *args, **kwargs) -> tuple[FixedVariableArray, ...]:
96
96
  assert all(not isinstance(a, FixedVariableArray) for a in kwargs.values())
97
- assert all(isinstance(a, FixedVariableArray) or isinstance(a, Sequence) for a in args)
98
97
  inputs = args[0] if len(args) == 1 else args
99
98
 
100
99
  if not isinstance(self.op, hgq.layers.QLayerBase):
@@ -134,7 +133,7 @@ class ReplayOperationBase(metaclass=ReplayOperationMeta):
134
133
  assert isinstance(layer.oq, Quantizer)
135
134
  outputs = mirror_quantizer(layer.oq, outputs)
136
135
 
137
- if isinstance(outputs, FixedVariableArray):
136
+ if isinstance(outputs, (FixedVariableArray, np.ndarray)):
138
137
  outputs = (outputs,)
139
138
 
140
139
  return outputs
@@ -193,7 +192,7 @@ class ReplayQBatchNormalization(ReplayOperationBase):
193
192
  def call(self, inputs: FixedVariableArray) -> FixedVariableArray:
194
193
  layer: QBatchNormalization = self.op
195
194
  scale, bias = map(np.array, layer.qscaler_and_qoffset)
196
- shape = layer._shape
195
+ shape = layer._shape[1:]
197
196
  return inputs * scale.reshape(shape) + bias.reshape(shape)
198
197
 
199
198
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: da4ml
3
- Version: 0.4.0
3
+ Version: 0.4.1
4
4
  Summary: Distributed Arithmetic for Machine Learning
5
5
  Author-email: Chang Sun <chsun@cern.ch>
6
6
  License: GNU Lesser General Public License v3 (LGPLv3)
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
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
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes