Lunderberg commented on PR #16314:
URL: https://github.com/apache/tvm/pull/16314#issuecomment-1883386382

   Good point.  I've updated the pattern and the rewrite rule with two changes:
   
   1. Check if `(A*B)*C` should be re-ordered into `A*(B*C)`.  Previously, only 
the reverse was checked.
   2. Only reorder the matmuls in either case when there's a provable benefit 
to doing so, based on the shapes of the three matrices.
   
   I also added several additional unit tests to validate the behavior, for 
cases where the initial matmul is left-to-right, and where the initial matmul 
is right-to-left.


-- 
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]

Reply via email to