tvm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [incubator-tvm] Hzfengsy commented on a change in pull request #5092: [TIR][PASS] dtype rewrite for indexing variables
Date Wed, 25 Mar 2020 15:33:50 GMT
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

Mime
View raw message