File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
hls4ml/model/optimizer/passes Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -90,8 +90,14 @@ def match(self, node: Layer):
90
90
def propagate (self , node : Layer , precision : FixedPrecisionType ):
91
91
from hls4ml .model .optimizer .passes .bit_exact import get_input_layers , get_output_layers
92
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
+
93
98
node .get_output_variable ().type .precision = precision
94
- node .attributes .attributes ['result_t' ].precision = precision
99
+ node .attributes ['result_t' ].precision = precision
100
+ node .attributes ['result_t_propagated' ] = True
95
101
96
102
if not isinstance (node , Reshape ):
97
103
return node
You can’t perform that action at this time.
0 commit comments