feat: Ignore invalid non-local Order edges in InlineDFG reachability check#3138
feat: Ignore invalid non-local Order edges in InlineDFG reachability check#3138aborgna-q wants to merge 1 commit into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3138 +/- ##
=======================================
Coverage 81.33% 81.33%
=======================================
Files 242 242
Lines 46925 46929 +4
Branches 40612 40616 +4
=======================================
+ Hits 38166 38170 +4
Misses 6767 6767
Partials 1992 1992
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
| to_visit.extend( | ||
| h.linked_inputs(n, order_outport) | ||
| .map(|(n, _)| n) | ||
| // Ignore non-local edges |
There was a problem hiding this comment.
| // Ignore non-local edges | |
| // Ignore (invalid) non-local order edges |
There was a problem hiding this comment.
Slightly ugh but yeah ok. Let's not confuse anyone by suggesting non-local edges can include order edges tho, these are invalid edges....
EDIT: hmmm, I suppose there is a broader issue here, is it a good idea for NormalizeCFGs to run InlineDFG on an invalid hugr at all? I mean, what kind of behaviour should it expect? This'll mean we assume the order path doesn't exist, but if the path were via a sibling of the DFG being inlined, that will be a valid order path after the InlineDFG completes....
|
Nvm. The check should never be |
is_order_reachableinInlineDFGsonly needs to check connectivity in the local region.This is a simple change making the
is_order_reachableignore non-local edges into other regions, to avoid doing unnecessary work.