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 2022/06/06 22:30:46 UTC

[GitHub] [incubator-mxnet] RafLit opened a new pull request, #21056: [BUGFIX] Fix mkldnn segfault in reshape operator

RafLit opened a new pull request, #21056:
URL: https://github.com/apache/incubator-mxnet/pull/21056

   ## Description ##
   Fix segfault in reshape operator when output and input tensor sizes differ.
   
   


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

To unsubscribe, e-mail: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-mxnet] bartekkuncer commented on a diff in pull request #21056: [BUGFIX] Fix mkldnn segfault in reshape operator

Posted by GitBox <gi...@apache.org>.
bartekkuncer commented on code in PR #21056:
URL: https://github.com/apache/incubator-mxnet/pull/21056#discussion_r891963936


##########
src/operator/nn/mkldnn/mkldnn_reshape.cc:
##########
@@ -127,6 +127,8 @@ void MKLDNNReshapeForward(const nnvm::NodeAttrs& attrs,
   // For mkldnn non-supported input, it shouldn't hold mkldnn memory, so let's simply fallback to
   // naive implement.
   const int input_ndims = input.shape().ndim();
+  CHECK(input.shape().Size() == output.shape().Size())

Review Comment:
   Do not you think that it should be checked "higher" as now it being present only in mkldnn branch suggests that it is only a mkldnn problem?



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

To unsubscribe, e-mail: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-mxnet] RafLit commented on a diff in pull request #21056: [BUGFIX] Fix mkldnn segfault in reshape operator

Posted by GitBox <gi...@apache.org>.
RafLit commented on code in PR #21056:
URL: https://github.com/apache/incubator-mxnet/pull/21056#discussion_r891760571


##########
src/operator/nn/mkldnn/mkldnn_reshape.cc:
##########
@@ -127,6 +127,8 @@ void MKLDNNReshapeForward(const nnvm::NodeAttrs& attrs,
   // For mkldnn non-supported input, it shouldn't hold mkldnn memory, so let's simply fallback to
   // naive implement.
   const int input_ndims = input.shape().ndim();
+  CHECK(input.shape().Size() == output.shape().Size())

Review Comment:
   The condition should be valid but it won't be used for generic MXNet path.



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

To unsubscribe, e-mail: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-mxnet] RafLit commented on pull request #21056: [BUGFIX] Fix mkldnn segfault in reshape operator

Posted by GitBox <gi...@apache.org>.
RafLit commented on PR #21056:
URL: https://github.com/apache/incubator-mxnet/pull/21056#issuecomment-1149589886

   @mxnet-bot run ci [edge, unix-cpu, unix-gpu]


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

To unsubscribe, e-mail: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-mxnet] mxnet-bot commented on pull request #21056: [BUGFIX] Fix mkldnn segfault in reshape operator

Posted by GitBox <gi...@apache.org>.
mxnet-bot commented on PR #21056:
URL: https://github.com/apache/incubator-mxnet/pull/21056#issuecomment-1149235389

   Jenkins CI successfully triggered : [unix-gpu, edge, unix-cpu]


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

To unsubscribe, e-mail: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-mxnet] bgawrych commented on pull request #21056: [BUGFIX] Fix mkldnn segfault in reshape operator

Posted by GitBox <gi...@apache.org>.
bgawrych commented on PR #21056:
URL: https://github.com/apache/incubator-mxnet/pull/21056#issuecomment-1156034572

   @mxnet-bot run ci [unix-cpu]


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

To unsubscribe, e-mail: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-mxnet] mxnet-bot commented on pull request #21056: [BUGFIX] Fix mkldnn segfault in reshape operator

Posted by GitBox <gi...@apache.org>.
mxnet-bot commented on PR #21056:
URL: https://github.com/apache/incubator-mxnet/pull/21056#issuecomment-1149589994

   Jenkins CI successfully triggered : [edge, unix-cpu, unix-gpu]


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

To unsubscribe, e-mail: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-mxnet] RafLit commented on pull request #21056: [BUGFIX] Fix mkldnn segfault in reshape operator

Posted by GitBox <gi...@apache.org>.
RafLit commented on PR #21056:
URL: https://github.com/apache/incubator-mxnet/pull/21056#issuecomment-1149235302

   @mxnet-bot run ci [edge, unix-cpu, unix-gpu]


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

To unsubscribe, e-mail: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-mxnet] mxnet-bot commented on pull request #21056: [BUGFIX] Fix mkldnn segfault in reshape operator

Posted by GitBox <gi...@apache.org>.
mxnet-bot commented on PR #21056:
URL: https://github.com/apache/incubator-mxnet/pull/21056#issuecomment-1147998876

   Hey @RafLit , Thanks for submitting the PR 
   All tests are already queued to run once. If tests fail, you can trigger one or more tests again with the following commands: 
   - To trigger all jobs: @mxnet-bot run ci [all] 
   - To trigger specific jobs: @mxnet-bot run ci [job1, job2] 
   *** 
   **CI supported jobs**: [windows-cpu, edge, miscellaneous, unix-gpu, unix-cpu, centos-cpu, sanity, website, clang, windows-gpu, centos-gpu]
   *** 
   _Note_: 
    Only following 3 categories can trigger CI :PR Author, MXNet Committer, Jenkins Admin. 
   All CI tests must pass before the PR can be merged. 
   


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

To unsubscribe, e-mail: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-mxnet] bartekkuncer commented on a diff in pull request #21056: [BUGFIX] Fix mkldnn segfault in reshape operator

Posted by GitBox <gi...@apache.org>.
bartekkuncer commented on code in PR #21056:
URL: https://github.com/apache/incubator-mxnet/pull/21056#discussion_r895491536


##########
src/operator/tensor/matrix_op-inl.h:
##########
@@ -225,12 +225,11 @@ inline bool ReshapeShape(const nnvm::NodeAttrs& attrs,
            && ReverseReshapeInferShape(&(*in_attrs)[0], (*out_attrs)[0]);
   }
   ReverseReshapeInferShape(&dshape, oshape);
-#if 0
-  CHECK_EQ(oshape.Size(), dshape.Size())
-    << "Target shape size is different to source. "
-    << "Target: " << oshape
-    << "\nSource: " << dshape;
-#endif
+  if (shape_is_known(dshape) && shape_is_known(oshape)) {
+    CHECK_EQ(oshape.Size(), dshape.Size())
+        << "Target shape size is different to source. "

Review Comment:
   ```suggestion
           << "Target shape size is different to source.\n"
   ```



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

To unsubscribe, e-mail: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-mxnet] RafLit commented on pull request #21056: [BUGFIX] Fix mkldnn segfault in reshape operator

Posted by GitBox <gi...@apache.org>.
RafLit commented on PR #21056:
URL: https://github.com/apache/incubator-mxnet/pull/21056#issuecomment-1156089913

   @mxnet-bot run ci [unix-cpu]


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

To unsubscribe, e-mail: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-mxnet] mxnet-bot commented on pull request #21056: [BUGFIX] Fix mkldnn segfault in reshape operator

Posted by GitBox <gi...@apache.org>.
mxnet-bot commented on PR #21056:
URL: https://github.com/apache/incubator-mxnet/pull/21056#issuecomment-1148486432

   Jenkins CI successfully triggered : [unix-gpu, unix-cpu, windows-cpu, edge]


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

To unsubscribe, e-mail: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-mxnet] RafLit commented on pull request #21056: [BUGFIX] Fix mkldnn segfault in reshape operator

Posted by GitBox <gi...@apache.org>.
RafLit commented on PR #21056:
URL: https://github.com/apache/incubator-mxnet/pull/21056#issuecomment-1148486324

   @mxnet-bot run ci [edge, unix-cpu, unix-gpu, windows-cpu]


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

To unsubscribe, e-mail: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-mxnet] bartekkuncer commented on a diff in pull request #21056: [BUGFIX] Fix mkldnn segfault in reshape operator

Posted by GitBox <gi...@apache.org>.
bartekkuncer commented on code in PR #21056:
URL: https://github.com/apache/incubator-mxnet/pull/21056#discussion_r890972358


##########
src/operator/nn/mkldnn/mkldnn_reshape.cc:
##########
@@ -127,6 +127,8 @@ void MKLDNNReshapeForward(const nnvm::NodeAttrs& attrs,
   // For mkldnn non-supported input, it shouldn't hold mkldnn memory, so let's simply fallback to
   // naive implement.
   const int input_ndims = input.shape().ndim();
+  CHECK(input.shape().Size() == output.shape().Size())

Review Comment:
   Is this condition valid also for 'generic' MXNet path?



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

To unsubscribe, e-mail: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-mxnet] bgawrych merged pull request #21056: [BUGFIX] Fix mkldnn segfault in reshape operator

Posted by GitBox <gi...@apache.org>.
bgawrych merged PR #21056:
URL: https://github.com/apache/incubator-mxnet/pull/21056


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

To unsubscribe, e-mail: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-mxnet] mxnet-bot commented on pull request #21056: [BUGFIX] Fix mkldnn segfault in reshape operator

Posted by GitBox <gi...@apache.org>.
mxnet-bot commented on PR #21056:
URL: https://github.com/apache/incubator-mxnet/pull/21056#issuecomment-1156034615

   Jenkins CI successfully triggered : [unix-cpu]


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

To unsubscribe, e-mail: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-mxnet] mxnet-bot commented on pull request #21056: [BUGFIX] Fix mkldnn segfault in reshape operator

Posted by GitBox <gi...@apache.org>.
mxnet-bot commented on PR #21056:
URL: https://github.com/apache/incubator-mxnet/pull/21056#issuecomment-1156090003

   Jenkins CI successfully triggered : [unix-cpu]


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

To unsubscribe, e-mail: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org