leezu opened a new issue #17992: MKLDNNConvolutionBackward accesses out of 
bound elements
URL: https://github.com/apache/incubator-mxnet/issues/17992
 
 
   ## Description
   CI with updated toolchain (ie #17984) catches the bug.
   
   `vector: :_M_range_check: __n (which is 2) >= this->size() (which is 2)`
   
   ### Error Message
   ## To Reproduce
   Build with this simple patch
   
   ``` diff
   diff --git a/src/operator/nn/mkldnn/mkldnn_convolution.cc 
b/src/operator/nn/mkldnn/mkldnn_convolution.cc
   index ada42a22c..95b44fd92 100644
   --- a/src/operator/nn/mkldnn/mkldnn_convolution.cc
   +++ b/src/operator/nn/mkldnn/mkldnn_convolution.cc
   @@ -480,7 +480,7 @@ void MKLDNNConvolutionBackward(const nnvm::NodeAttrs& 
attrs, const OpContext &ct
                                               {MKLDNN_ARG_DIFF_SRC, 
*in_grad_mem.second}});
        CommitOutput(in_grad[conv::kData], in_grad_mem);
      }
   -  if (req[conv::kWeight] || req[conv::kBias]) {
   +  if (req.at(conv::kWeight) || req.at(conv::kBias)) {
        if (convBwd.GetDataPd().diff_dst_desc() != 
convBwd.GetWeightsPd().diff_dst_desc())
          out_grad_mem = 
out_grad.GetMKLDNNDataReorder(convBwd.GetWeightsPd().diff_dst_desc());
        auto data_mem = 
data.GetMKLDNNDataReorder(convBwd.GetWeightsPd().src_desc());
   
   ```
   
   OR follow the instructions in 
https://github.com/apache/incubator-mxnet/issues/17987 to trigger this via 
glibc assertions in debug build.
   
   Run `test_operator.test_convolution_independent_gradients` to trigger the 
bug.
   
   cc @TaoLv 

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to