AndrewZhaoLuo commented on code in PR #13056:
URL: https://github.com/apache/tvm/pull/13056#discussion_r993938788


##########
src/relay/transforms/simplify_expr.cc:
##########
@@ -146,7 +146,7 @@ class SimplifyConsecutiveCast : public DFPatternRewrite {
       // BFloat cast cannot be omitted
       return false;
     }
-    if (origin.code() < cast.code()) {
+    if (origin.code() < cast.code() && origin.bits() <= cast.bits()) {

Review Comment:
   If the point of this pass is making sure the output has the exact same 
output as old IRModule but with some casts remove, it actually doesn't do that 
job.



-- 
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: commits-unsubscr...@tvm.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to