pengzhao-intel commented on a change in pull request #11095: [MKLDNN] reorder the mem format for the AddBack mode in case src & dst is different URL: https://github.com/apache/incubator-mxnet/pull/11095#discussion_r191668195
########## File path: src/operator/nn/mkldnn/mkldnn_base.cc ########## @@ -128,8 +128,14 @@ void CommitOutput(const NDArray &arr, const mkldnn_output_t &res) { if (res.first == CopyBack) { const_cast<NDArray &>(arr).CopyFrom(*res.second); } else if (res.first == AddBack) { - auto mem = arr.GetMKLDNNData(res.second->get_primitive_desc()); - CHECK(mem != nullptr); Review comment: I think it can work but it will be a little confusion to call reorder API for all cases. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services