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 2019/09/09 20:53:57 UTC

[GitHub] [incubator-mxnet] ChaiBapchya commented on a change in pull request #16104: Faster Transpose 2D

ChaiBapchya commented on a change in pull request #16104: Faster Transpose 2D
URL: https://github.com/apache/incubator-mxnet/pull/16104#discussion_r322449757
 
 

 ##########
 File path: src/operator/tensor/matrix_op-inl.h
 ##########
 @@ -285,8 +322,9 @@ void TransposeImpl(RunContext ctx,
      case 2: {
       mshadow::Tensor<xpu, 2, DType> in = src.FlatTo2D<xpu, DType>(s);
       mshadow::Tensor<xpu, 2, DType> out = ret.FlatTo2D<xpu, DType>(s);
+
       if (axes[0] == 1 && axes[1] == 0) {
-        out = in.T();
+        Transpose2D<xpu, DType>(in.dptr_, out.dptr_, in.shape_[0], in.shape_[1]);
 
 Review comment:
   Can work either way, but passing 2 shapes as params or as combined.

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


With regards,
Apache Git Services