pytorch
a8add2b9 - Support matching Args for SubgraphMatcher (#85456)

Commit
3 years ago
Support matching Args for SubgraphMatcher (#85456) Subgraph matcher now handles the matching of non-Node arguments. Here are the 4 cases - pn is Node, gn is Node: this go through the regular _match_node() function - pn is Noed, gn is not a Node: this is a match if only pn is a placeholder op - pn is not Node, gn is Node: this is a no match case - pn is not a Node, gn is not a Node: this will go through the argument comparison. With this change ``` def target(x): return foo(x, 3) def pattern(x, y): return foo(x, y) ``` is a match Pull Request resolved: https://github.com/pytorch/pytorch/pull/85456 Approved by: https://github.com/jerryzh168
Author
Committer
Parents
Loading