Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
meta-project-ci committed Jul 11, 2020
1 parent c9c77c6 commit e941d98
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/te/schedule/operation_inline.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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
vmap.Set(args_[i], cast(args_[i].dtype(), op->indices[i]));
}
expr = Substitute(Evaluate(expr), vmap).as<EvaluateNode>()->value;
}
Expand Down

0 comments on commit e941d98

Please sign in to comment.