azai91 commented on a change in pull request #11608: [MXNET-489] MKLDNN Pool 
test
URL: https://github.com/apache/incubator-mxnet/pull/11608#discussion_r202809746
 
 

 ##########
 File path: src/operator/nn/pooling.cc
 ##########
 @@ -223,12 +223,13 @@ void PoolingComputeExCPU(const nnvm::NodeAttrs &attrs, 
const OpContext &ctx,
                          const std::vector<NDArray> &outputs) {
   const PoolingParam &param = nnvm::get<PoolingParam>(attrs.parsed);
   const NDArray *workspace = nullptr;
-  if (MKLDNNRequireWorkspace(param)) {
-    CHECK_GT(outputs.size(), 1U);
-    workspace = &outputs[1];
-  }
-  if (SupportMKLDNN(inputs[0])
-      && SupportMKLDNNPooling(param, inputs[0].shape())) {
+  if (SupportMKLDNN(inputs[0]) &&
+      SupportMKLDNNPooling(param, inputs[0].shape()) &&
+      SupportMKLDNNPooling(inputs[0], outputs[0])) {
 
 Review comment:
   the SupportMKLDNNPooling that just accepts a param is used very extensively 
in other parts of the code (in GetNumOutputs, GetNumInputs, PoolingType and 15 
other places). I can just rename this function.

----------------------------------------------------------------
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

Reply via email to