append applied_flows container before filling instead of after #641
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This change simply appends
applied_flows
toModelGraph._applied_flows
in the beginning, before it is filled, so thatModelGraph._applied_flows
always has an accurate description of what has been applied. This is important in the FIFO depth optimization, because theFifoDepthOptimization
runs the writer flow outside of the main flow, before the flow is finished and beforeModelGraph._applied_flows
is updated, so currently it seesModelGraph._applied_flows == []
, and since the writer depends on'vivado:ip'
, all the optimizers are run again, which sometimes messes things up. For example, running on a ResNet sample, rerunning the optimizers changes a type from beingPackedType
to just beingFixedPrecisionType
, causing it to fail. This way,ModelGraph._applied_flows
is always current so the out of main flow writer does not run'vivado:ip'
again.I also updated a few empty lists to empty sets so that applied_flows is always a dictionary of sets, not a dictionary of sets or empty lists.
Type of change
Tests
The main test is to see that this doesn't break the current pytests. The FIFO optimization is too long to run as a standard test.
Checklist