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/05/17 15:36:18 UTC

[GitHub] [incubator-mxnet] agrabows opened a new pull request, #21032: Refactor SupportDNNL functions

agrabows opened a new pull request, #21032:
URL: https://github.com/apache/incubator-mxnet/pull/21032

   ## Description ##
   For any oneDNN primitive use for MXNet operator it is necessary to check if operators' inputs, parameters and sometimes outputs are compatible with primitive's boundaries. Almost every operator had its SupportDNNL function that was checking those conditions. Goal of this PR is to systematize those functions by making universal SupportDNNL<>() function with multiple use cases possible
   
   ## Checklist ##
   ### Essentials ###
   - [x] Changes are complete (i.e. I finished coding on this PR)
   - [x] All changes have test coverage
   - [x] Code is well-documented
   
   ### Changes ###
   - [x] Create universal SupportDNNL function
   - [x] Refactor SupportDNNLOp functions using new function


-- 
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 merged pull request #21032: Refactor SupportDNNL functions

Posted by GitBox <gi...@apache.org>.
bgawrych merged PR #21032:
URL: https://github.com/apache/incubator-mxnet/pull/21032


-- 
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 #21032: Refactor SupportDNNL functions

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

   Jenkins CI successfully triggered : [unix-cpu, sanity, centos-gpu, edge, website, clang, miscellaneous, centos-cpu, windows-gpu, windows-cpu, unix-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 #21032: Refactor SupportDNNL functions

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

   Jenkins CI successfully triggered : [unix-cpu, centos-gpu, unix-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 #21032: Refactor SupportDNNL functions

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

   Jenkins CI successfully triggered : [sanity]


-- 
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 a diff in pull request #21032: Refactor SupportDNNL functions

Posted by GitBox <gi...@apache.org>.
bgawrych commented on code in PR #21032:
URL: https://github.com/apache/incubator-mxnet/pull/21032#discussion_r902790619


##########
src/operator/nn/dnnl/dnnl_softmax_output.cc:
##########
@@ -90,9 +90,10 @@ static DNNLSoftmaxOutputFwd& GetSoftmaxOutputForward(const SoftmaxOutputParam& p
   return it->second;
 }
 
-//  This is only used for forward. For backward ,need double check compatibility
-bool SupportDNNLSoftmaxOutput(const SoftmaxOutputParam& param) {
-  return param.multi_output ? false : true;
+//  This is only used for forward. For backward one needs to need double check compatibility.

Review Comment:
   ```suggestion
   ```



-- 
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 a diff in pull request #21032: Refactor SupportDNNL functions

Posted by GitBox <gi...@apache.org>.
bgawrych commented on code in PR #21032:
URL: https://github.com/apache/incubator-mxnet/pull/21032#discussion_r901692474


##########
src/operator/nn/dnnl/dnnl_reduce.cc:
##########
@@ -111,10 +109,9 @@ bool SupportDNNLReduceImpl(const NumpyReduceAxesParam& param,
   }
   // initial value not supported by oneDNN
   param_supported = param_supported && !param.initial.has_value();
-  return param_supported &&
-         (input.dtype() == mshadow::kFloat32 || input.dtype() == mshadow::kBfloat16) &&
-         (output.dtype() == mshadow::kFloat32 || output.dtype() == mshadow::kBfloat16) &&
-         in_ndim >= 1 && out_size > 0 && in_size > 1;
+  // oneDNN does not support recution of tensors with size equal to 1

Review Comment:
   ```suggestion
     // oneDNN does not support reduction of tensors with size equal to 1
   ```



##########
src/operator/nn/dnnl/dnnl_softmax_output.cc:
##########
@@ -90,9 +90,10 @@ static DNNLSoftmaxOutputFwd& GetSoftmaxOutputForward(const SoftmaxOutputParam& p
   return it->second;
 }
 
-//  This is only used for forward. For backward ,need double check compatibility
-bool SupportDNNLSoftmaxOutput(const SoftmaxOutputParam& param) {
-  return param.multi_output ? false : true;
+//  This is only used for forward. For backward one needs to need double check compatibility.

Review Comment:
   two spaces at the beggining, second phrase is strange for me



-- 
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 #21032: Refactor SupportDNNL functions

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

   @mxnet-bot run ci [clang]


-- 
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] agrabows commented on pull request #21032: Refactor SupportDNNL functions

Posted by GitBox <gi...@apache.org>.
agrabows commented on PR #21032:
URL: https://github.com/apache/incubator-mxnet/pull/21032#issuecomment-1160137293

   @mxnet-bot run ci [unix-cpu, centos-gpu, unix-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 #21032: Refactor SupportDNNL functions

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

   Hey @agrabows , 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**: [centos-cpu, sanity, website, miscellaneous, unix-cpu, edge, unix-gpu, centos-gpu, windows-cpu, windows-gpu, clang]
   *** 
   _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] agrabows commented on pull request #21032: Refactor SupportDNNL functions

Posted by GitBox <gi...@apache.org>.
agrabows commented on PR #21032:
URL: https://github.com/apache/incubator-mxnet/pull/21032#issuecomment-1134773650

   @mxnet-bot run ci [sanity]


-- 
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 #21032: Refactor SupportDNNL functions

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

   Jenkins CI successfully triggered : [clang]


-- 
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 #21032: Refactor SupportDNNL functions

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

   Jenkins CI successfully triggered : [centos-cpu, unix-gpu, 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] agrabows commented on pull request #21032: Refactor SupportDNNL functions

Posted by GitBox <gi...@apache.org>.
agrabows commented on PR #21032:
URL: https://github.com/apache/incubator-mxnet/pull/21032#issuecomment-1140784131

   @mxnet-bot run ci [centos-cpu, centos-gpu, unix-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] agrabows commented on pull request #21032: Refactor SupportDNNL functions

Posted by GitBox <gi...@apache.org>.
agrabows commented on PR #21032:
URL: https://github.com/apache/incubator-mxnet/pull/21032#issuecomment-1135465880

   @mxnet-bot run ci [all]


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