zheng-da commented on a change in pull request #11301: MKLDNN Backward op cache
URL: https://github.com/apache/incubator-mxnet/pull/11301#discussion_r200880952
##########
File path: src/operator/nn/lrn.cc
##########
@@ -129,6 +129,8 @@ void LRNComputeExCPU(const nnvm::NodeAttrs &attrs,
MKLDNN_OPCHECK_INIT(false, 1, inputs, outputs);
MKLDNNLRNForward(ctx, param, inputs[0], req[0], outputs[0]);
MKLDNN_OPCHECK_RUN(LRNCompute<cpu>, attrs, ctx, inputs, req, outputs);
+ // Copy outputs[1] from opcheck reference as backward check needs it.
+ MKLDNN_OPCHECK_COPY_RESULT(outputs, std::vector<size_t>{1});
Review comment:
thanks for explaining. i just didn't understand why we needed this.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services