[inductor] add subsystem to pattern matcher#163922
[inductor] add subsystem to pattern matcher#163922avikchaudhuri wants to merge 1 commit intopytorch:mainfrom
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/163922
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 44a4c64 with merge base d7491fb ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
@avikchaudhuri has exported this pull request. If you are a Meta employee, you can view the originating diff in D83306676. |
eellison
left a comment
There was a problem hiding this comment.
nice ! but lets wait for test failures to be fixed..
| @@ -1,5 +1,6 @@ | |||
| # mypy: allow-untyped-defs | |||
| import copy | |||
| import functools | |||
There was a problem hiding this comment.
pre_grad_passes doesnt exist yet in bisector - mind adding it ?
There was a problem hiding this comment.
So basically add a line here?
There was a problem hiding this comment.
Hmm, I'll do this in a separate PR.
qq:
Looks like the bisector doesn't pick up something like:
with GraphTransformObserver(gm, "pre_grad_custom_pass"):
config.pre_grad_custom_pass(gm.graph)
so instead I have to do:
GraphTransformObserver(gm, "pre_grad_custom_pass").apply_graph_pass(
config.pre_grad_custom_pass
)
KP? @eellison
c8c702c to
4e442e6
Compare
Summary: Running a toy example through `torch.compile(fullgraph=True, backend="inductor")` with default inductor config, we tried to see what passes are run in each of pre-grad, joint-graph, and post-grad phases by printing out the subsystem in `GraphTransformObserver`. However the subsystem showed up as None in a bunch of transforms that were run in each of those phases, so this PR adds some additional annotations. Note that these annotations are probably not a complete set, since other transforms may run based on changes to the config that are not covered here. Hopefully this doesn't change behavior. However, I did notice that bisecting relies on disabling various phases, which means that while before some passes would *not* be disabled (because their subsystem was `None`, now they would). Test Plan: existing tests + manual test described in summary Differential Revision: D83306676
|
@avikchaudhuri has exported this pull request. If you are a Meta employee, you can view the originating diff in D83306676. |
Summary: Pull Request resolved: pytorch#163922 Running a toy example through `torch.compile(fullgraph=True, backend="inductor")` with default inductor config, we tried to see what passes are run in each of pre-grad, joint-graph, and post-grad phases by printing out the subsystem in `GraphTransformObserver`. However the subsystem showed up as None in a bunch of transforms that were run in each of those phases, so this PR adds some additional annotations. Note that these annotations are probably not a complete set, since other transforms may run based on changes to the config that are not covered here. Hopefully this doesn't change behavior. However, I did notice that bisecting relies on disabling various phases, which means that while before some passes would *not* be disabled (because their subsystem was `None`, now they would). Test Plan: existing tests + manual test described in summary Differential Revision: D83306676
|
@avikchaudhuri has exported this pull request. If you are a Meta employee, you can view the originating diff in D83306676. |
4e442e6 to
44a4c64
Compare
|
@pytorchbot merge |
|
@pytorchbot merge (Initiating merge automatically since Phabricator Diff has merged) |
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 |
Summary: Running a toy example through `torch.compile(fullgraph=True, backend="inductor")` with default inductor config, I tried to see what passes are run in each of pre-grad, joint-graph, and post-grad phases by printing out the subsystem in `GraphTransformObserver`. However the subsystem showed up as None in a bunch of transforms that were run in each of those phases, so this PR adds some additional annotations. Note that these annotations are probably not a complete set, since other transforms may run based on changes to the config that are not covered here. Hopefully this doesn't change behavior. However, I did notice that bisecting relies on disabling various phases, which means that while before some passes would *not* be disabled (because their subsystem was `None`), now they would. Test Plan: existing tests + manual test described in summary Differential Revision: D83306676 Pull Request resolved: #163922 Approved by: https://github.com/jansel
Summary: Running a toy example through `torch.compile(fullgraph=True, backend="inductor")` with default inductor config, I tried to see what passes are run in each of pre-grad, joint-graph, and post-grad phases by printing out the subsystem in `GraphTransformObserver`. However the subsystem showed up as None in a bunch of transforms that were run in each of those phases, so this PR adds some additional annotations. Note that these annotations are probably not a complete set, since other transforms may run based on changes to the config that are not covered here. Hopefully this doesn't change behavior. However, I did notice that bisecting relies on disabling various phases, which means that while before some passes would *not* be disabled (because their subsystem was `None`), now they would. Test Plan: existing tests + manual test described in summary Differential Revision: D83306676 Pull Request resolved: pytorch#163922 Approved by: https://github.com/jansel
Summary:
Running a toy example through
torch.compile(fullgraph=True, backend="inductor")with default inductor config, I tried to see what passes are run in each of pre-grad, joint-graph, and post-grad phases by printing out the subsystem inGraphTransformObserver. However the subsystem showed up as None in a bunch of transforms that were run in each of those phases, so this PR adds some additional annotations.Note that these annotations are probably not a complete set, since other transforms may run based on changes to the config that are not covered here.
Hopefully this doesn't change behavior. However, I did notice that bisecting relies on disabling various phases, which means that while before some passes would not be disabled (because their subsystem was
None), now they would.Test Plan: existing tests + manual test described in summary
Differential Revision: D83306676
cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @chenyang78 @kadeng @muchulee8 @amjames @chauhang @aakhundov @coconutruben