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/08/31 17:27:12 UTC

[GitHub] [incubator-mxnet] sxjscience commented on a change in pull request #19015: Numpy nonzero large tensor fix

sxjscience commented on a change in pull request #19015:
URL: https://github.com/apache/incubator-mxnet/pull/19015#discussion_r480277134



##########
File path: src/operator/numpy/np_nonzero_op-inl.h
##########
@@ -43,6 +43,25 @@ namespace mxnet {
 namespace op {
 
 struct NonzeroForwardKernel {
+  // this is for cpu
+  template<int ndim>
+  MSHADOW_XINLINE static void Map(index_t i,
+                                  int64_t* out,

Review comment:
       For me, I feel that it's better to use template because most of the codes are duplicated.




----------------------------------------------------------------
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