Skip to content

Rewire model output

Javier Duarte requested to merge github/fork/thesps/rewire-model-output-new into master

Created by: thesps

The follow up PR after closing #367.

Node insertions & replacements that touch the model output are not properly handled. I've added a method that's called at the end of each graph manipulation that finds the node outputs that are not consumed by other nodes, and sets the model outputs to those. Those model outputs are therefore properly updated after a manipulation that changes the output node.

I've added a simple test for this behavior that starts with an initial model like this: model The tests then variously insert/remove/replace nodes at each possible position and verify the output. Without the changes this PR makes to hls_model.py, 2 of the 8 operations fail (3 & 7: the ones that insert & replace at the end). They pass with the changes.

This is also needed for the tests added by #328.

Merge request reports

Loading