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 2018/11/20 00:40:05 UTC

[GitHub] anirudh2290 commented on a change in pull request #12884: adding unittest for MKLDNN Softmax operator

anirudh2290 commented on a change in pull request #12884: adding unittest for MKLDNN Softmax operator
URL: https://github.com/apache/incubator-mxnet/pull/12884#discussion_r234830313
 
 

 ##########
 File path: tests/cpp/operator/mkldnn_operator_test.cc
 ##########
 @@ -558,31 +607,41 @@ void TestOpEx(const OpAttrs &forward_attrs, const OpAttrs &backwards_attrs) {
         Engine::Get()->WaitForAll();
         AssertEqual(outputs, ex_outputs);
 
-        // backwards test performed same time since output needed
-        backwards_input[0] = outputs[0];  // output grad
-        backwards_input[1] = inputs[0];  // input
-        backwards_input[2] = outputs[1];  // out norm
+        if (!backwards_attrs.requests.empty()) {
+          TestOpExBackward(forward_attrs, backwards_attrs, OpReqType::kWriteTo,
 
 Review comment:
   I think this is a good suggestion for refactoring. Basically since we are doing InvokeOp and Comparison of expected and actual outputs twice in this function can we pull it to its own function like in TestOpExBackward. WDYT?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services