We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 93507e8 commit 5254d97Copy full SHA for 5254d97
hls4ml/model/optimizer/passes/hgq_proxy_model.py
@@ -90,8 +90,14 @@ def match(self, node: Layer):
90
def propagate(self, node: Layer, precision: FixedPrecisionType):
91
from hls4ml.model.optimizer.passes.bit_exact import get_input_layers, get_output_layers
92
93
+ if node.attributes.get('result_t_propagated', False):
94
+ msg = f'result_t for {node.name} propagated multiple times. \
95
+ Bit-exactness may be compromised. Consider void using consecutive quantizers in your model.'
96
+ warn(msg, stacklevel=1)
97
+
98
node.get_output_variable().type.precision = precision
- node.attributes.attributes['result_t'].precision = precision
99
+ node.attributes['result_t'].precision = precision
100
+ node.attributes['result_t_propagated'] = True
101
102
if not isinstance(node, Reshape):
103
return node
0 commit comments