You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2022/07/08 03:51:20 UTC

[GitHub] [tvm] junrushao1994 commented on a diff in pull request #12035: [TIR] Avoid unnecessary dtype escalation in loop splitting

junrushao1994 commented on code in PR #12035:
URL: https://github.com/apache/tvm/pull/12035#discussion_r916440640


##########
src/tir/schedule/concrete_schedule.cc:
##########
@@ -452,6 +452,9 @@ Array<LoopRV> ConcreteScheduleNode::Split(const LoopRV& loop_rv,
       if (is_const_int(factor) && !is_positive_const(factor)) {
         throw NonPositiveFactorError(state_->mod, factor.as<IntImmNode>()->value, i);
       }
+      if (factor.dtype().bits() > loop->extent.dtype().bits()) {
+        factor = tir::Cast(loop->extent.dtype(), factor);

Review Comment:
   right



-- 
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-unsubscribe@tvm.apache.org

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