-
Notifications
You must be signed in to change notification settings - Fork 25.7k
fx.replace_pattern accepts pattern/replacement as GraphModule #88479
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
[ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/88479
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 3a8aa62: This comment was automatically generated by Dr. CI and updates every 15 minutes. |
| if isinstance(pattern, GraphModule): | ||
| pattern_graph = pattern.graph | ||
| else: | ||
| pattern_graph = symbolic_trace(pattern).graph |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if we do symbolic_trace then the pattern can be a nn.Module I think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lol... nn.Module is also a Callable, coz it implemented call
So we are good
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry I think I misread the PR, sounds good
|
@pytorchbot merge -g |
1 similar comment
|
@pytorchbot merge -g |
Merge startedYour change will be merged once all checks on your PR pass since you used the green (-g) flag (ETA: 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Merge failedReason: 2 additional jobs have failed, first few of them are: trunk ,trunk / cuda11.6-py3.10-gcc7-sm86 / test (default, 3, 4, linux.g5.4xlarge.nvidia.gpu) Details for Dev Infra teamRaised by workflow job |
|
@pytorchbot merge -g |
Merge startedYour change will be merged once all checks on your PR pass since you used the green (-g) flag (ETA: 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
…h#88479) Symbolic tracer is no longer the default tracer to produce fx graph. SubgraphRewriter should thus accept a raw GraphModule, rather than use symbolic tracer by default. Pull Request resolved: pytorch#88479 Approved by: https://github.com/jerryzh168
…h#88479) Symbolic tracer is no longer the default tracer to produce fx graph. SubgraphRewriter should thus accept a raw GraphModule, rather than use symbolic tracer by default. Pull Request resolved: pytorch#88479 Approved by: https://github.com/jerryzh168
Stack from ghstack (oldest at bottom):
Symbolic tracer is no longer the default tracer to produce fx graph.
SubgraphRewriter should thus accept a raw GraphModule, rather than use symbolic tracer by default.