You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2020/10/13 23:42:47 UTC

[GitHub] [incubator-mxnet] leezu commented on a change in pull request #19339: [WIP] Numpy Argmax(min) Rewrite

leezu commented on a change in pull request #19339:
URL: https://github.com/apache/incubator-mxnet/pull/19339#discussion_r504319331



##########
File path: src/operator/tensor/broadcast_reduce-inl.h
##########
@@ -278,7 +279,10 @@ MSHADOW_XINLINE void seq_reduce_assign(const index_t idx, const size_t M, const
   Reducer::SetInitValue(val, residual);
   for (size_t k = 0; k < M; ++k) {
     coord = mxnet_op::unravel(k, rshape);
-    Reducer::Reduce(val, AType(OP::Map(big[j + mxnet_op::dot(coord, rstride)])), residual);
+    AType temp = OP::Map(big[j + mxnet_op::dot(coord, rstride)]);
+    if (use_index)
+      memcpy(reinterpret_cast<char*>(&temp), &k, sizeof(size_t));

Review comment:
       Can you paste the error?




----------------------------------------------------------------
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:
users@infra.apache.org