apeforest commented on a change in pull request #12884: adding unittest for
MKLDNN Softmax operator
URL: https://github.com/apache/incubator-mxnet/pull/12884#discussion_r234817851
##########
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:
Can we separate in multiple functions then? It seems this function becomes
too bulky at the current design.
----------------------------------------------------------------
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