diff --git a/include/tvm/topi/transform.h b/include/tvm/topi/transform.h index 441dd781d03cd..b2132b75fab94 100644 --- a/include/tvm/topi/transform.h +++ b/include/tvm/topi/transform.h @@ -581,11 +581,11 @@ inline te::Tensor dynamic_strided_slice(const te::Tensor& x, const te::Tensor& b [&](const Array& indices) { Array real_indices; // dynamic slicing - for (int64_t i = 0; i < num_dynamic_axes; ++i) { + for (int32_t i = 0; i < num_dynamic_axes; ++i) { real_indices.push_back(indices[i] * strides(i) + tvm::min(begin(i), x->shape[i] - 1)); } // keep input dim - for (int64_t i = num_dynamic_axes; i < src_tensor_dim; ++i) { + for (int32_t i = num_dynamic_axes; i < src_tensor_dim; ++i) { real_indices.push_back(indices[i]); } return x(real_indices);