[Helion + torch.compile] Allow multi-output template fusion logic override in TemplateBuffer#175186
[Helion + torch.compile] Allow multi-output template fusion logic override in TemplateBuffer#175186
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/175186
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 081c94d with merge base fb9623f ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This PR needs a
|
793c14a to
c5a6242
Compare
torch/_inductor/ir.py
Outdated
| def can_fuse_multi_outputs_template( | ||
| self, node1: BaseSchedulerNode, node2: BaseSchedulerNode | ||
| ) -> bool: |
There was a problem hiding this comment.
This adds some risk of circular dependency between scheduler.py and ir.py. Any reason that this method can not be in scheduler.py.
There was a problem hiding this comment.
Made some changes to this part, but I think we still need an overridable method in TemplateBuffer so that HelionTemplateBuffer can override it to implement custom fusion decisions
3e864b0 to
11609b2
Compare
…rride in TemplateBuffer
11609b2 to
081c94d
Compare
|
@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 |
…rride in TemplateBuffer (#175186) Move `is_multi_outputs_template` and `can_fuse_multi_outputs_template` onto `TemplateBuffer` as virtual methods so that subclasses (e.g. `HelionTemplateBuffer`) can override fusion behavior. Design doc: pytorch/helion#1346 Pull Request resolved: #175186 Approved by: https://github.com/shunting314
…rride in TemplateBuffer (pytorch#175186) Move `is_multi_outputs_template` and `can_fuse_multi_outputs_template` onto `TemplateBuffer` as virtual methods so that subclasses (e.g. `HelionTemplateBuffer`) can override fusion behavior. Design doc: pytorch/helion#1346 Pull Request resolved: pytorch#175186 Approved by: https://github.com/shunting314
Move
is_multi_outputs_templateandcan_fuse_multi_outputs_templateontoTemplateBufferas virtual methods so that subclasses (e.g.HelionTemplateBuffer) can override fusion behavior.Design doc: pytorch/helion#1346
cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @kadeng @muchulee8 @amjames @chauhang @aakhundov @coconutruben @jataylo