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 2020/03/25 15:33:50 UTC

[GitHub] [incubator-tvm] Hzfengsy commented on a change in pull request #5092: [TIR][PASS] dtype rewrite for indexing variables

Hzfengsy commented on a change in pull request #5092: [TIR][PASS] dtype rewrite for indexing variables
URL: https://github.com/apache/incubator-tvm/pull/5092#discussion_r397949397
 
 

 ##########
 File path: src/tir/pass/unroll_loop.cc
 ##########
 @@ -160,7 +160,9 @@ class LoopUnroller : public StmtExprMutator {
     PrimExpr extent = tir::Simplify(op->extent);
     const IntImmNode  *v1 = extent.as<IntImmNode>();
     int value = -1;
-    if (v1 != nullptr) {
+    // integers that do not fit in int32_t are treated as symbolic,
+    // as it's impossible to unroll such large loops
+    if (v1 != nullptr && v1->value <= std::numeric_limits<int>::max()) {
 
 Review comment:
   I wonder if we should use `int32_t` here rather than `int`. I'm not sure, but just worry about `int` will represent different types (`int16_t`, `int32_t` or `int64_t`) on different systems and devices.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services