Skip to content

Commit

Permalink
[Folding] Change condition for meeting target cycles from '<' to '<='
Browse files Browse the repository at this point in the history
  • Loading branch information
iksnagreb committed May 3, 2024
1 parent 766e9fb commit d320ac0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/finn/transformation/fpgadataflow/set_folding.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def optimize_attribute_val(self, node_inst, max_val, attr_name):
for val in divisors(max_val):
node_inst.set_nodeattr(attr_name, val)
cyc = node_inst.get_exp_cycles()
if cyc < self.target_cycles_per_frame:
if cyc <= self.target_cycles_per_frame:
# finish if target met
break

Expand Down Expand Up @@ -138,7 +138,7 @@ def apply(self, model):
prev_simd_val = node_inst.get_nodeattr("SIMD")
node_inst.set_nodeattr("SIMD", simd_val)
cyc = node_inst.get_exp_cycles()
if cyc < self.target_cycles_per_frame:
if cyc <= self.target_cycles_per_frame:
# finish if target met
break
if (
Expand Down

0 comments on commit d320ac0

Please sign in to comment.