mseth10 commented on a change in pull request #12884: adding unittest for
MKLDNN Softmax operator
URL: https://github.com/apache/incubator-mxnet/pull/12884#discussion_r234844640
##########
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:
@anirudh2290 TestOpExBackward is written for only one request type whereas
TestOpEx is written for multiple request types which have very few lines of
code in common. Hence, refactoring won't make much of a difference here.
----------------------------------------------------------------
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