chore(inductor): Simplify will_fusion_create_cycle and cleanup to node.ancestors #109976
chore(inductor): Simplify will_fusion_create_cycle and cleanup to node.ancestors #109976jon-chuang wants to merge 3 commits intopytorch:mainfrom
will_fusion_create_cycle and cleanup to node.ancestors #109976Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/109976
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 756553b with merge base 0d3db10 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
@pytorchbot label "topic: not user facing" |
ancestors and will_fusion_create_cyclewill_fusion_create_cycle and cleanup scheduler node.ancestors
will_fusion_create_cycle and cleanup scheduler node.ancestors will_fusion_create_cycle and cleanup to node.ancestors
|
|
||
| if shortcut: | ||
| return cond0 | ||
| if node.get_names().issubset(combined_ancestors): |
There was a problem hiding this comment.
Note to reviewer: this just reorders things.
bool(combined_names & node.ancestors) should be similar cost to node.get_names().issubset(combined_ancestors)
There was a problem hiding this comment.
Further afterthought: combined_ancestors is also likely to be in cache for hashset lookup, as opposed to node.ancestors
|
@pytorchbot merge |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
recursive_predecessors == ancestors so rename.
Improve comments
Simplify
will_fusion_create_cycle- make it easier to read and add detailed comments.Diagram to illustrate clarification of shortcut.

CC: @ngimel
cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @Xia-Weiwen @wenzhe-nrv @jiayisunx @peterbell10 @ipiszy @yf225 @chenyang78 @kadeng @muchulee8 @aakhundov @ColinPeppler