pytorch
6de216a2 - [fx] Have replace_pattern return replaced nodes (#90244)

Commit
2 years ago
[fx] Have replace_pattern return replaced nodes (#90244) Summary: Modified replace_pattern in the subgraph rewriter to return a list of pairs of matches along with their corresponding replacement nodes in the modified graph (`List[Tuple[Match, List[Node]]]`). This allows us to easily modify the replaced nodes, including setting the metadata. Test Plan: CI Differential Revision: D41737056 Pull Request resolved: https://github.com/pytorch/pytorch/pull/90244 Approved by: https://github.com/SherlockNoMad
Author
Committer
Parents
Loading