access2rohit commented on a change in pull request #17882: Improve performance
of broadcast_axis
URL: https://github.com/apache/incubator-mxnet/pull/17882#discussion_r410409695
##########
File path: src/operator/tensor/broadcast_reduce_op.h
##########
@@ -1103,21 +1132,55 @@ inline void BroadcastComputeImpl(const
nnvm::NodeAttrs& attrs,
out_shape[i] = 1;
}
}
- if (dst_shape.ndim() == 2) {
+ uint64_t axes[dst_shape.ndim()], out_stride[dst_shape.ndim()];
+ int iter = dst_shape.ndim() - 1, i = 0;
+ bool flag = false;
Review comment:
this flag ensure if broadcast_axis is supplied with input where input shape
= output shape(i.e. no broadcast). In such a case we are simply invoking copy.
will change it to `shape_changed`
----------------------------------------------------------------
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]
With regards,
Apache Git Services