jwfromm commented on a change in pull request #5235:
URL: https://github.com/apache/incubator-tvm/pull/5235#discussion_r455845167
##########
File path: src/te/schedule/operation_inline.cc
##########
@@ -63,7 +63,9 @@ class OperationInliner final : public StmtExprMutator {
} else {
Map<Var, PrimExpr> vmap;
for (size_t i = 0; i < args_.size(); ++i) {
- vmap.Set(args_[i], op->indices[i]);
+ // indices into `operation_` must be in the range of its output
shape,
+ // so we can safely cast the indices without worrying about overflow
Review comment:
i see, it makes sense that we need to cast to the original indexing type
of the operator being fused into. Why though can we "safely cast the indices
without worrying about overflow"? Isn't it still possible to overflow given a
sufficiently large index?
----------------------------------------------------------------
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]