azai91 commented on a change in pull request #11262: [MXNET-542] Fix mkldnn performance regression + improve test logging URL: https://github.com/apache/incubator-mxnet/pull/11262#discussion_r195908368
########## File path: src/operator/nn/mkldnn/mkldnn_base.cc ########## @@ -77,26 +77,36 @@ mkldnn::memory *TmpMemMgr::Alloc(const mkldnn::memory::primitive_desc &pd) { } } -mkldnn_output_t CreateMKLDNNMem(const NDArray &arr, - const mkldnn::memory::primitive_desc &desc, - OpReqType req) { +bool CanWriteTo(const NDArray &out_arr, + const NDArray &in_arr, + const mkldnn::memory::primitive_desc &desc) { + bool add_same = in_arr.GetMKLDNNData()->get_data_handle() == + out_arr.GetMKLDNNData()->get_data_handle(); + bool pdesc_same = out_arr.GetMKLDNNData()->get_primitive_desc() == desc; Review comment: can only compare with first input ---------------------------------------------------------------- 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