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 2022/01/27 13:53:00 UTC

[GitHub] [incubator-mxnet] bartekkuncer commented on a change in pull request #20776: [master] Unified oneDNN pooling implementation calls

bartekkuncer commented on a change in pull request #20776:
URL: https://github.com/apache/incubator-mxnet/pull/20776#discussion_r793623910



##########
File path: src/operator/nn/dnnl/dnnl_pooling.cc
##########
@@ -384,22 +373,38 @@ DNNLPoolingBwd& GetPoolingBwd(const PoolingParam& param,
   return it->second;
 }
 
-void DNNLPoolingGradCompute(const OpContext& ctx,
-                            const PoolingParam& param,
-                            const NDArray& out_grad,
-                            const NDArray& in_data,
-                            const NDArray* workspace,
-                            const OpReqType req,
-                            const NDArray& in_grad) {
-  if (req == kNullOp) {
+void DNNLPoolingGradCompute(const nnvm::NodeAttrs& attrs,
+                            const OpContext& ctx,
+                            const std::vector<NDArray>& inputs,
+                            const std::vector<OpReqType>& req,
+                            const std::vector<NDArray>& outputs) {
+  if (req[0] == kNullOp) {
     return;
   }
 
+  const PoolingParam& param = nnvm::get<PoolingParam>(attrs.parsed);
+
+  const NDArray& out_grad  = inputs[0];
+  const NDArray* workspace = nullptr;
+  const NDArray* in_data   = nullptr;
+  if (DNNLRequireWorkspace(param)) {
+    // The first two elements are the gradient of the outputs in forward.

Review comment:
       ```suggestion
       // The first two elements are the gradients of the outputs in forward.
   ```




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org