DickJC123 commented on a change in pull request #13749: Add NHWC layout support
to Pooling (cpu, gpu cuda, gpu cuDNN)
URL: https://github.com/apache/incubator-mxnet/pull/13749#discussion_r254103480
##########
File path: src/operator/nn/pooling.cc
##########
@@ -421,11 +463,16 @@ NNVM_REGISTER_OP(_backward_Pooling)
.set_attr<nnvm::FInplaceOption>(
"FInplaceOption",
[](const NodeAttrs &attrs) {
-#if MXNET_USE_CUDNN == 1
- return std::vector<std::pair<int, int> >();
-#else
- return std::vector<std::pair<int, int> >{{1, 0}};
+#if MXNET_USE_MKLDNN == 1 && MXNET_USE_CUDA == 0 && MXNET_USE_CUDNN == 0
Review comment:
Sorry for any confusion. Perhaps my comments in the code for FInplaceOption
speak to the issue more directly:
```
// Since this routine is not provided the cpu/gpu context info, only in
the case
// where CUDA and CUDNN implementations are not available can we be sure
the MKLDNN
// implementation will be employed. The MKLDNN FInplaceOptions are not
compatible
// with the other (i.e. cpu, cuda and cudnn) implementations.
```
----------------------------------------------------------------
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