da4ml 0.4.0__py3-none-any.whl → 0.4.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 +2 -2
- da4ml/codegen/rtl/rtl_model.py +3 -2
- da4ml/converter/hgq2/replica.py +2 -3
- {da4ml-0.4.0.dist-info → da4ml-0.4.1.dist-info}/METADATA +1 -1
- {da4ml-0.4.0.dist-info → da4ml-0.4.1.dist-info}/RECORD +8 -8
- {da4ml-0.4.0.dist-info → da4ml-0.4.1.dist-info}/WHEEL +0 -0
- {da4ml-0.4.0.dist-info → da4ml-0.4.1.dist-info}/licenses/LICENSE +0 -0
- {da4ml-0.4.0.dist-info → da4ml-0.4.1.dist-info}/top_level.txt +0 -0
da4ml/_version.py
CHANGED
|
@@ -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.
|
|
32
|
-
__version_tuple__ = version_tuple = (0, 4,
|
|
31
|
+
__version__ = version = '0.4.1'
|
|
32
|
+
__version_tuple__ = version_tuple = (0, 4, 1)
|
|
33
33
|
|
|
34
34
|
__commit_id__ = commit_id = None
|
da4ml/codegen/rtl/rtl_model.py
CHANGED
|
@@ -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[
|
|
98
|
-
xdc = xdc.replace('${DELAY_MIN}', str(self._io_delay_minmax[
|
|
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
|
|
da4ml/converter/hgq2/replica.py
CHANGED
|
@@ -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,5 +1,5 @@
|
|
|
1
1
|
da4ml/__init__.py,sha256=IETRRvzsJvPMLu1kzzi8UN5FYaM5MhNaXH2A_ZKr2_w,469
|
|
2
|
-
da4ml/_version.py,sha256=
|
|
2
|
+
da4ml/_version.py,sha256=k7cu0JKra64gmMNU_UfA5sw2eNc_GRvf3QmesiYAy8g,704
|
|
3
3
|
da4ml/cmvm/__init__.py,sha256=4Tbt913k9zP0w8R1p6Oss06v5jrManbUhskyHl6e-U0,154
|
|
4
4
|
da4ml/cmvm/api.py,sha256=JpecMt6g8zutGh_uWT61_0iX8TuXct7-jq7N7HMIsgA,9626
|
|
5
5
|
da4ml/cmvm/types.py,sha256=O8BuBZ2SyucxoXt_KbulAuHNgim7Ls3M6Ovw8prLgXM,21340
|
|
@@ -33,7 +33,7 @@ da4ml/codegen/hls/source/ap_types/hls_stream.h,sha256=NTkVfbE48c6XnMIfR9WzJbDwUn
|
|
|
33
33
|
da4ml/codegen/hls/source/ap_types/etc/ap_private.h,sha256=TDdxGIX0r3D6Ql8KeXoceRmHhdlwFA3Akr3-vvMVAtk,261465
|
|
34
34
|
da4ml/codegen/hls/source/ap_types/utils/x_hls_utils.h,sha256=x24cf1HyZKv0J8YQIoUvYE3uw6SNL7vWetRGIiFm2Jw,2227
|
|
35
35
|
da4ml/codegen/rtl/__init__.py,sha256=51VNqMc0JygphulBB4jjqeL9Sd18IUjGhkp2oyUDdnA,505
|
|
36
|
-
da4ml/codegen/rtl/rtl_model.py,sha256=
|
|
36
|
+
da4ml/codegen/rtl/rtl_model.py,sha256=8GY25qyW02vEb4br_pO2bXGwBiJKbEBYLkROnr4OYjs,14374
|
|
37
37
|
da4ml/codegen/rtl/common_source/binder_util.hh,sha256=gAcfnfzgDt2OudljfeQjtUtncNVjwRmEwu5VI7VSF6Q,2545
|
|
38
38
|
da4ml/codegen/rtl/common_source/build_binder.mk,sha256=i1CsER5jtY3GmKJCw4H8f70vh_2_FJyNVt3FTLzdJf8,1386
|
|
39
39
|
da4ml/codegen/rtl/common_source/build_prj.tcl,sha256=QkKZTJOsOfQxgDUmDw8vnrQvUluYWz_yI5VB3oyIzIo,3651
|
|
@@ -59,7 +59,7 @@ da4ml/codegen/rtl/vhdl/source/template.xdc,sha256=GlSRy8tw_orohSuUwUSNEYJLLkAAHt
|
|
|
59
59
|
da4ml/converter/__init__.py,sha256=x7J2PEXYZsVWffRAkucLxbwzzU404eaijMdLwdhBxtY,57
|
|
60
60
|
da4ml/converter/hgq2/__init__.py,sha256=-gnT_7zXY-KQtPLxsqngwDKZ2TUIynn996pUjjB03B8,59
|
|
61
61
|
da4ml/converter/hgq2/parser.py,sha256=Yc5V-B_aEslqIXXJihRi3GMjF9vMkmUQ2_yHMGHMPVo,5573
|
|
62
|
-
da4ml/converter/hgq2/replica.py,sha256=
|
|
62
|
+
da4ml/converter/hgq2/replica.py,sha256=wBbLF_NqbfowdKw31AI-x2aud9PEjuGLcKvWSh3y5Vc,16215
|
|
63
63
|
da4ml/trace/__init__.py,sha256=dv-rti3t8iE0RqeThfOb40mAg8FZB2WkkGQq3enJft0,282
|
|
64
64
|
da4ml/trace/fixed_variable.py,sha256=7vaXFZToCVzPtUZcHv4aoqpqJp46SHUzSWTQijVT0os,21101
|
|
65
65
|
da4ml/trace/fixed_variable_array.py,sha256=mJj9aU-jLCPVkFXrTbcRQndtUKEuhVwiFUGVSGX7PHE,12975
|
|
@@ -69,8 +69,8 @@ da4ml/trace/ops/__init__.py,sha256=fz5Cg7ZQqPkZlUj4bIOKY6aaoA1fX_G22TeA8I1n4qY,2
|
|
|
69
69
|
da4ml/trace/ops/conv_utils.py,sha256=Yn73t4F6Tcs1hBwK08L1DPOin2HYVcng4PSkU4vuZFo,8245
|
|
70
70
|
da4ml/trace/ops/einsum_utils.py,sha256=ODofbvR98FwKBTDZsJ0ObbMjU9_GjPu5AbGuWX6sdCY,11453
|
|
71
71
|
da4ml/trace/ops/reduce_utils.py,sha256=vQjEUUbvnW8inAYJWHDzgy-PbgwIdHlH-uzPzSEvrSc,3494
|
|
72
|
-
da4ml-0.4.
|
|
73
|
-
da4ml-0.4.
|
|
74
|
-
da4ml-0.4.
|
|
75
|
-
da4ml-0.4.
|
|
76
|
-
da4ml-0.4.
|
|
72
|
+
da4ml-0.4.1.dist-info/licenses/LICENSE,sha256=46mU2C5kSwOnkqkw9XQAJlhBL2JAf1_uCD8lVcXyMRg,7652
|
|
73
|
+
da4ml-0.4.1.dist-info/METADATA,sha256=7Tqk-kFr5sXBx6sjFY1NBvPsRXoU06j7p4IGlyqUkLs,4059
|
|
74
|
+
da4ml-0.4.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
75
|
+
da4ml-0.4.1.dist-info/top_level.txt,sha256=N0tnKVwRqFiffFdeAzCgFq71hUNySh5-ITbNd6-R58Q,6
|
|
76
|
+
da4ml-0.4.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|