masahi commented on a change in pull request #8971:
URL: https://github.com/apache/tvm/pull/8971#discussion_r707846211
##########
File path: include/tvm/topi/transform.h
##########
@@ -1242,6 +1244,8 @@ inline Tensor gather(const Tensor& data, int axis, const
Tensor& indices,
out_shape.push_back(indices->shape[i]);
}
+ PrimExpr axis_size = data->shape[axis];
Review comment:
remove it
##########
File path: include/tvm/topi/transform.h
##########
@@ -1252,12 +1256,13 @@ inline Tensor gather(const Tensor& data, int axis,
const Tensor& indices,
Array<PrimExpr> real_indices;
for (size_t i = 0; i < ndim_i; ++i) {
if (i == static_cast<size_t>(axis)) {
- real_indices.push_back(indices(indices_position));
+ PrimExpr index = indices(indices_position);
+ real_indices.push_back(index);
Review comment:
remove this diff
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]