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/06 23:07:16 UTC

[GitHub] [incubator-mxnet] Zha0q1 commented on a change in pull request #19302: Numpy diag large tensor fix

Zha0q1 commented on a change in pull request #19302:
URL: https://github.com/apache/incubator-mxnet/pull/19302#discussion_r500645129



##########
File path: src/api/operator/numpy/np_matrix_op.cc
##########
@@ -490,7 +490,10 @@ MXNET_REGISTER_API("_npi.diag")
   const nnvm::Op* op = Op::Get("_npi_diag");
   nnvm::NodeAttrs attrs;
   op::NumpyDiagParam param;
-  param.k = args[1].operator int();
+  if (features::is_enabled(features::INT64_TENSOR_SIZE))
+    param.k = args[1].operator int64_t();
+  else
+    param.k = args[1].operator int();

Review comment:
       there is no index_t operator in include/mxnet/runtime/packed_func.h so we need to branch like this




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