tqchen commented on a change in pull request #10544:
URL: https://github.com/apache/tvm/pull/10544#discussion_r822686615
##########
File path: src/tir/transforms/common_subexpr_elim_tools.cc
##########
@@ -727,7 +728,10 @@ bool EquivalentTerms(const PrimExpr& a, const PrimExpr& b)
{
// For now, we just check the syntactic equality, but that could later
become a semantic test,
// for instance identifying computations modulo commutativity (like x+y and
y+x), or modulo
// associativity (like (x+y)+z and x+(y+z)), etc.
- return EqualTerms(a, b);
+ arith::Analyzer analyser;
Review comment:
Thanks @yuanfz98 , One thing to note here is that running recursively
simplification on every subexpression would result in a possibly quadratic
complexity wrt to the expression size, so we would want to use it with care,
perhaps only triger with limited expression length to avoid long compilation
time.
In this particular case, directly running a simplification pass before the
common subexpr elim would have a same effect.
--
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]