hzfan commented on pull request #6143:
URL: https://github.com/apache/incubator-tvm/pull/6143#issuecomment-669734043
@yzhliu @tqchen It's ready for review.
I'm not sure if this pr introduces perf. regression (because some models may
contain i64 indexing, and not all i64 can be narrowed).
Do we need a compilation flag like `TVM_USE_I64` (defaults to `ON`) to roll
back if regression is detected by users? We can get it removed if no regression
is reported for quite some time.
```
const int64_t* pval = tir::as_const_int(val);
if (pval != nullptr) {
#ifdef TVM_USE_I64 // new behavior introduced by this pr
res.push_back(val);
#else // original behavior
CHECK_LE(pval[0], std::numeric_limits<int32_t>::max());
CHECK_GE(pval[0], std::numeric_limits<int32_t>::min());
res.push_back(IntImm(DataType::Int(32), *pval));
#endif
}
```
----------------------------------------------------------------
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:
[email protected]