Skip to content

Commit f51f5e6

Browse files
committed
bit-exactness corner case
1 parent 3728c0d commit f51f5e6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

hls4ml/model/optimizer/passes/bit_exact.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,7 @@ def request_kif(layer: Layer) -> tuple[KIF_t, ...]:
586586
def default_register_precision(layer: Layer):
587587
_pk, _pi, _pf = produce_kif(layer) # Maximum possible k,i,f output from this layer
588588
_rk, _ri, _rf = requested_kif(layer) # Maximum possible k,i,f may be utilized by the next layer
589-
_ok, _oi, _of = np.minimum(_pk, _rk), np.minimum(_pi, _ri), np.minimum(_pf, _rf)
589+
_ok, _oi, _of = _rk, np.minimum(_pi, _ri), np.minimum(_pf, _rf)
590590
ok, oi, of = kif_arrs_to_ints((_ok, _oi, _of))
591591

592592
result_t = to_hls4ml_fixed(ok, oi, of, f'{layer.name}_t')
@@ -840,3 +840,5 @@ def transform(self, model, node: Layer):
840840
node.get_output_variable().type = new_type
841841
node.model.config.layer_name_precision[node.name] = str(new_type)
842842
return False
843+
node.model.config.layer_name_precision[node.name] = str(new_type)
844+
return False

0 commit comments

Comments
 (0)