pytorch
d6d55f85 - [fx] Variatic arg matching (#99431)

Commit
1 year ago
[fx] Variatic arg matching (#99431) For cases where the pattern graph matches on x number of arguments, but the matching graph omits some of these arguments (by using the default values instead), right now SubgraphMatcher fails because these graphs have a different number of arguments. So instead in the case where we see the pattern/replacement nodes have different number of arguments, we will add the default values onto whichever argument set is lacking arguments. Note this support is only for when we are matching targets that are instances of OpOverload, which have a schema and default values tied to them. Pull Request resolved: https://github.com/pytorch/pytorch/pull/99431 Approved by: https://github.com/jerryzh168
Author
Committer
Parents
Loading