Lunderberg opened a new pull request, #15494:
URL: https://github.com/apache/tvm/pull/15494
Prior to this commit, the commutative pattern matching was enabled based on
the operation in the pattern. As a result, commutative matches would only be
checked if the match checked for a single operator, but not if the operator was
itself a pattern that resolved to a commutative operator.
```python
pattern_add = ExprPattern(Op.get("relax.add"))
pattern_mul = ExprPattern(Op.get("relax.multiply"))
uses_commutative_matching = pattern_add(lhs, rhs)
no_commutative_matching = OrPattern(pattern_add, pattern_mul)(lhs, rhs)
```
This commit updates the pattern matcher to check against the matched
operator, rather than the pattern, to determine whether to check for
commutative matches.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]