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 2021/12/13 16:20:38 UTC

[GitHub] [incubator-mxnet] piotrwolinski-intel opened a new pull request #20776: [master] Unified oneDNN pooling implementation calls

piotrwolinski-intel opened a new pull request #20776:
URL: https://github.com/apache/incubator-mxnet/pull/20776


   Unified calling of oneDNN implementations, so now all pooling operators are using same style as other operators using oneDNN
   


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



[GitHub] [incubator-mxnet] mxnet-bot commented on pull request #20776: [master] Unified oneDNN pooling implementation calls

Posted by GitBox <gi...@apache.org>.
mxnet-bot commented on pull request #20776:
URL: https://github.com/apache/incubator-mxnet/pull/20776#issuecomment-992641677


   Hey @piotrwolinski-intel , Thanks for submitting the PR 
   All tests are already queued to run once. If tests fail, you can trigger one or more tests again with the following commands: 
   - To trigger all jobs: @mxnet-bot run ci [all] 
   - To trigger specific jobs: @mxnet-bot run ci [job1, job2] 
   *** 
   **CI supported jobs**: [clang, website, unix-gpu, sanity, centos-gpu, windows-cpu, unix-cpu, edge, miscellaneous, centos-cpu, windows-gpu]
   *** 
   _Note_: 
    Only following 3 categories can trigger CI :PR Author, MXNet Committer, Jenkins Admin. 
   All CI tests must pass before the PR can be merged. 
   


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



[GitHub] [incubator-mxnet] piotrwolinski-intel commented on pull request #20776: [master] Unified oneDNN pooling implementation calls

Posted by GitBox <gi...@apache.org>.
piotrwolinski-intel commented on pull request #20776:
URL: https://github.com/apache/incubator-mxnet/pull/20776#issuecomment-1070966725


   Changes in this PR got obsolete due to the [other PR](https://github.com/apache/incubator-mxnet/pull/20825) that also introduced them 


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



[GitHub] [incubator-mxnet] piotrwolinski-intel commented on pull request #20776: [master] Unified oneDNN pooling implementation calls

Posted by GitBox <gi...@apache.org>.
piotrwolinski-intel commented on pull request #20776:
URL: https://github.com/apache/incubator-mxnet/pull/20776#issuecomment-1070966725






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



[GitHub] [incubator-mxnet] mxnet-bot commented on pull request #20776: [master] Unified oneDNN pooling implementation calls

Posted by GitBox <gi...@apache.org>.
mxnet-bot commented on pull request #20776:
URL: https://github.com/apache/incubator-mxnet/pull/20776#issuecomment-1002120295


   Jenkins CI successfully triggered : [unix-cpu]


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



[GitHub] [incubator-mxnet] bgawrych commented on pull request #20776: [master] Unified oneDNN pooling implementation calls

Posted by GitBox <gi...@apache.org>.
bgawrych commented on pull request #20776:
URL: https://github.com/apache/incubator-mxnet/pull/20776#issuecomment-1061546923


   @piotrwolinski-intel Can you rebase this change?


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



[GitHub] [incubator-mxnet] piotrwolinski-intel closed pull request #20776: [master] Unified oneDNN pooling implementation calls

Posted by GitBox <gi...@apache.org>.
piotrwolinski-intel closed pull request #20776:
URL: https://github.com/apache/incubator-mxnet/pull/20776


   


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



[GitHub] [incubator-mxnet] piotrwolinski-intel removed a comment on pull request #20776: [master] Unified oneDNN pooling implementation calls

Posted by GitBox <gi...@apache.org>.
piotrwolinski-intel removed a comment on pull request #20776:
URL: https://github.com/apache/incubator-mxnet/pull/20776#issuecomment-1070966725


   Changes in this PR got obsolete due to the [other PR](https://github.com/apache/incubator-mxnet/pull/20825) that also introduced them 


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



[GitHub] [incubator-mxnet] piotrwolinski-intel commented on pull request #20776: [master] Unified oneDNN pooling implementation calls

Posted by GitBox <gi...@apache.org>.
piotrwolinski-intel commented on pull request #20776:
URL: https://github.com/apache/incubator-mxnet/pull/20776#issuecomment-1002120231


   @mxnet-bot run ci [unix-cpu]


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



[GitHub] [incubator-mxnet] mxnet-bot commented on pull request #20776: [master] Unified oneDNN pooling implementation calls

Posted by GitBox <gi...@apache.org>.
mxnet-bot commented on pull request #20776:
URL: https://github.com/apache/incubator-mxnet/pull/20776#issuecomment-1054654101


   Jenkins CI successfully triggered : [windows-gpu]


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



[GitHub] [incubator-mxnet] mxnet-bot commented on pull request #20776: [master] Unified oneDNN pooling implementation calls

Posted by GitBox <gi...@apache.org>.
mxnet-bot commented on pull request #20776:
URL: https://github.com/apache/incubator-mxnet/pull/20776#issuecomment-1011190674


   Jenkins CI successfully triggered : [centos-gpu]


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



[GitHub] [incubator-mxnet] piotrwolinski-intel commented on pull request #20776: [master] Unified oneDNN pooling implementation calls

Posted by GitBox <gi...@apache.org>.
piotrwolinski-intel commented on pull request #20776:
URL: https://github.com/apache/incubator-mxnet/pull/20776#issuecomment-1031315802


   @mxnet-bot run ci [centos-gpu]


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



[GitHub] [incubator-mxnet] piotrwolinski-intel removed a comment on pull request #20776: [master] Unified oneDNN pooling implementation calls

Posted by GitBox <gi...@apache.org>.
piotrwolinski-intel removed a comment on pull request #20776:
URL: https://github.com/apache/incubator-mxnet/pull/20776#issuecomment-1070966725


   Changes in this PR got obsolete due to the [other PR](https://github.com/apache/incubator-mxnet/pull/20825) that also introduced them 


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



[GitHub] [incubator-mxnet] piotrwolinski-intel closed pull request #20776: [master] Unified oneDNN pooling implementation calls

Posted by GitBox <gi...@apache.org>.
piotrwolinski-intel closed pull request #20776:
URL: https://github.com/apache/incubator-mxnet/pull/20776


   


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



[GitHub] [incubator-mxnet] piotrwolinski-intel commented on pull request #20776: [master] Unified oneDNN pooling implementation calls

Posted by GitBox <gi...@apache.org>.
piotrwolinski-intel commented on pull request #20776:
URL: https://github.com/apache/incubator-mxnet/pull/20776#issuecomment-1070996297


   Changes in this PR got obsolete due to the https://github.com/apache/incubator-mxnet/pull/20825 that also introduced them


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



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

Posted by GitBox <gi...@apache.org>.
piotrwolinski-intel commented on a change in pull request #20776:
URL: https://github.com/apache/incubator-mxnet/pull/20776#discussion_r773958159



##########
File path: src/operator/nn/dnnl/dnnl_pooling-inl.h
##########
@@ -172,27 +173,34 @@ inline bool DNNLRequireWorkspace(const PoolingParam& param) {
 }
 
 typedef ParamOpSign<PoolingParam> DNNLPoolingSignature;
-void DNNLPoolingCompute(const OpContext& ctx,
-                        const PoolingParam& param,
-                        const NDArray& in_data,
-                        const OpReqType req,
-                        const NDArray& out_data,
-                        const NDArray* workspace,
-                        const bool use_adaptive_pooling);
-
-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);
+
+void DNNLPoolingGradCompute(const nnvm::NodeAttrs& attrs,
+                            const OpContext& ctx,
+                            const std::vector<NDArray>& inputs,
+                            const std::vector<OpReqType>& req,
+                            const std::vector<NDArray>& outputs);
 
 DNNLPoolingFwd& GetPoolingFwd(const PoolingParam& param,
                               const bool is_train,
                               const NDArray& data,
                               const NDArray& output,
                               const bool use_adaptive_pooling);
+
+template <bool use_adaptive_pooling>
+void DNNLPoolingCompute(const nnvm::NodeAttrs& attrs,

Review comment:
       So right now there are also some other definitions in this .h file 
   #20776/files#diff-0c62b326967e9ddb0686baebd8cf8956ae723a5121e8f6a0fe5acfad70e2be6dR91-R92




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



[GitHub] [incubator-mxnet] piotrwolinski-intel commented on pull request #20776: [master] Unified oneDNN pooling implementation calls

Posted by GitBox <gi...@apache.org>.
piotrwolinski-intel commented on pull request #20776:
URL: https://github.com/apache/incubator-mxnet/pull/20776#issuecomment-1054654051


   @mxnet-bot run ci [windows-gpu]


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



[GitHub] [incubator-mxnet] piotrwolinski-intel commented on pull request #20776: [master] Unified oneDNN pooling implementation calls

Posted by GitBox <gi...@apache.org>.
piotrwolinski-intel commented on pull request #20776:
URL: https://github.com/apache/incubator-mxnet/pull/20776#issuecomment-1011190552


   @mxnet-bot run ci [centos-gpu]


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



[GitHub] [incubator-mxnet] piotrwolinski-intel commented on pull request #20776: [master] Unified oneDNN pooling implementation calls

Posted by GitBox <gi...@apache.org>.
piotrwolinski-intel commented on pull request #20776:
URL: https://github.com/apache/incubator-mxnet/pull/20776#issuecomment-1031181474


   @mxnet-bot run ci [centos-gpu, unix-cpu ]


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



[GitHub] [incubator-mxnet] mxnet-bot commented on pull request #20776: [master] Unified oneDNN pooling implementation calls

Posted by GitBox <gi...@apache.org>.
mxnet-bot commented on pull request #20776:
URL: https://github.com/apache/incubator-mxnet/pull/20776#issuecomment-1031315869


   Jenkins CI successfully triggered : [centos-gpu]


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



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

Posted by GitBox <gi...@apache.org>.
piotrwolinski-intel commented on a change in pull request #20776:
URL: https://github.com/apache/incubator-mxnet/pull/20776#discussion_r773867587



##########
File path: src/operator/nn/dnnl/dnnl_pooling-inl.h
##########
@@ -172,27 +173,34 @@ inline bool DNNLRequireWorkspace(const PoolingParam& param) {
 }
 
 typedef ParamOpSign<PoolingParam> DNNLPoolingSignature;
-void DNNLPoolingCompute(const OpContext& ctx,
-                        const PoolingParam& param,
-                        const NDArray& in_data,
-                        const OpReqType req,
-                        const NDArray& out_data,
-                        const NDArray* workspace,
-                        const bool use_adaptive_pooling);
-
-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);
+

Review comment:
       Because it is type declaration and for the readability purposes it is in my opinion better for it to be separated. Of course if I'm not missing convention or something




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



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

Posted by GitBox <gi...@apache.org>.
piotrwolinski-intel commented on a change in pull request #20776:
URL: https://github.com/apache/incubator-mxnet/pull/20776#discussion_r773958159



##########
File path: src/operator/nn/dnnl/dnnl_pooling-inl.h
##########
@@ -172,27 +173,34 @@ inline bool DNNLRequireWorkspace(const PoolingParam& param) {
 }
 
 typedef ParamOpSign<PoolingParam> DNNLPoolingSignature;
-void DNNLPoolingCompute(const OpContext& ctx,
-                        const PoolingParam& param,
-                        const NDArray& in_data,
-                        const OpReqType req,
-                        const NDArray& out_data,
-                        const NDArray* workspace,
-                        const bool use_adaptive_pooling);
-
-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);
+
+void DNNLPoolingGradCompute(const nnvm::NodeAttrs& attrs,
+                            const OpContext& ctx,
+                            const std::vector<NDArray>& inputs,
+                            const std::vector<OpReqType>& req,
+                            const std::vector<NDArray>& outputs);
 
 DNNLPoolingFwd& GetPoolingFwd(const PoolingParam& param,
                               const bool is_train,
                               const NDArray& data,
                               const NDArray& output,
                               const bool use_adaptive_pooling);
+
+template <bool use_adaptive_pooling>
+void DNNLPoolingCompute(const nnvm::NodeAttrs& attrs,

Review comment:
       So right now there is also some other definition in this .h file, [ie.](https://github.com/apache/incubator-mxnet/blob/3ef827a3daaec32b7f214b955493ba0f3e87fb68/src/operator/nn/dnnl/dnnl_pooling-inl.h#L92)




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



[GitHub] [incubator-mxnet] mxnet-bot commented on pull request #20776: [master] Unified oneDNN pooling implementation calls

Posted by GitBox <gi...@apache.org>.
mxnet-bot commented on pull request #20776:
URL: https://github.com/apache/incubator-mxnet/pull/20776#issuecomment-1031181562


   Jenkins CI successfully triggered : [centos-gpu, unix-cpu]


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



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

Posted by GitBox <gi...@apache.org>.
bartekkuncer commented on a change in pull request #20776:
URL: https://github.com/apache/incubator-mxnet/pull/20776#discussion_r768552082



##########
File path: src/operator/nn/dnnl/dnnl_pooling-inl.h
##########
@@ -172,27 +173,34 @@ inline bool DNNLRequireWorkspace(const PoolingParam& param) {
 }
 
 typedef ParamOpSign<PoolingParam> DNNLPoolingSignature;
-void DNNLPoolingCompute(const OpContext& ctx,
-                        const PoolingParam& param,
-                        const NDArray& in_data,
-                        const OpReqType req,
-                        const NDArray& out_data,
-                        const NDArray* workspace,
-                        const bool use_adaptive_pooling);
-
-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);
+

Review comment:
       Why there is an empty line here now?

##########
File path: src/operator/nn/dnnl/dnnl_pooling-inl.h
##########
@@ -172,27 +173,34 @@ inline bool DNNLRequireWorkspace(const PoolingParam& param) {
 }
 
 typedef ParamOpSign<PoolingParam> DNNLPoolingSignature;
-void DNNLPoolingCompute(const OpContext& ctx,
-                        const PoolingParam& param,
-                        const NDArray& in_data,
-                        const OpReqType req,
-                        const NDArray& out_data,
-                        const NDArray* workspace,
-                        const bool use_adaptive_pooling);
-
-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);
+
+void DNNLPoolingGradCompute(const nnvm::NodeAttrs& attrs,
+                            const OpContext& ctx,
+                            const std::vector<NDArray>& inputs,
+                            const std::vector<OpReqType>& req,
+                            const std::vector<NDArray>& outputs);
 
 DNNLPoolingFwd& GetPoolingFwd(const PoolingParam& param,
                               const bool is_train,
                               const NDArray& data,
                               const NDArray& output,
                               const bool use_adaptive_pooling);
+
+template <bool use_adaptive_pooling>
+void DNNLPoolingCompute(const nnvm::NodeAttrs& attrs,

Review comment:
       Can this not stay in .cc file?




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



[GitHub] [incubator-mxnet] mxnet-bot commented on pull request #20776: [master] Unified oneDNN pooling implementation calls

Posted by GitBox <gi...@apache.org>.
mxnet-bot commented on pull request #20776:
URL: https://github.com/apache/incubator-mxnet/pull/20776#issuecomment-1049795561


   Jenkins CI successfully triggered : [windows-gpu, unix-cpu]


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



[GitHub] [incubator-mxnet] piotrwolinski-intel commented on pull request #20776: [master] Unified oneDNN pooling implementation calls

Posted by GitBox <gi...@apache.org>.
piotrwolinski-intel commented on pull request #20776:
URL: https://github.com/apache/incubator-mxnet/pull/20776#issuecomment-1049795465


   @mxnet-bot run ci [unix-cpu, windows-gpu]


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



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

Posted by GitBox <gi...@apache.org>.
piotrwolinski-intel commented on a change in pull request #20776:
URL: https://github.com/apache/incubator-mxnet/pull/20776#discussion_r773958159



##########
File path: src/operator/nn/dnnl/dnnl_pooling-inl.h
##########
@@ -172,27 +173,34 @@ inline bool DNNLRequireWorkspace(const PoolingParam& param) {
 }
 
 typedef ParamOpSign<PoolingParam> DNNLPoolingSignature;
-void DNNLPoolingCompute(const OpContext& ctx,
-                        const PoolingParam& param,
-                        const NDArray& in_data,
-                        const OpReqType req,
-                        const NDArray& out_data,
-                        const NDArray* workspace,
-                        const bool use_adaptive_pooling);
-
-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);
+
+void DNNLPoolingGradCompute(const nnvm::NodeAttrs& attrs,
+                            const OpContext& ctx,
+                            const std::vector<NDArray>& inputs,
+                            const std::vector<OpReqType>& req,
+                            const std::vector<NDArray>& outputs);
 
 DNNLPoolingFwd& GetPoolingFwd(const PoolingParam& param,
                               const bool is_train,
                               const NDArray& data,
                               const NDArray& output,
                               const bool use_adaptive_pooling);
+
+template <bool use_adaptive_pooling>
+void DNNLPoolingCompute(const nnvm::NodeAttrs& attrs,

Review comment:
       So right now there is also some other definition in this .h file, [ie.](https://github.com/apache/incubator-mxnet/pull/20776/files#diff-0c62b326967e9ddb0686baebd8cf8956ae723a5121e8f6a0fe5acfad70e2be6dR91-R92)




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



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

Posted by GitBox <gi...@apache.org>.
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