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/03/01 12:26:47 UTC

[GitHub] [incubator-mxnet] agrabows opened a new pull request #19971: Fusing Leaky Relu operator in Fully Connected

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


   ## Description ##
   This change will enable fusing Leaky Relu operator and Fully Connected into single operator supported by oneDNN backend for both int8 and fp32 data types. 
   
   ## Checklist ##
   ### Essentials ###
   - [x] PR's title starts with a category (e.g. [BUGFIX], [MODEL], [TUTORIAL], [FEATURE], [DOC], etc)
   - [x] Changes are complete (i.e. I finished coding on this PR)
   - [x] All changes have test coverage
   
   ### Changes ###
   - [x] Fusing FC with leaky relu for oneDNN backend


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

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



[GitHub] [incubator-mxnet] szha commented on a change in pull request #19971: [FEATURE] Fusing Leaky Relu operator in Fully Connected

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



##########
File path: src/operator/subgraph/mkldnn/mkldnn_fc_property.h
##########
@@ -102,6 +102,16 @@ class SgMKLDNNFCSelector : public SubgraphSelector {
             return true;
           }
         }
+        if (new_node.op() == Op::Get("LeakyReLU")) {
+          const LeakyReLUParam &param = nnvm::get<LeakyReLUParam>(new_node.attrs.parsed);
+          if (param.act_type == leakyrelu::kLeakyReLU ||
+              param.act_type == leakyrelu::kELU ||
+              param.act_type == leakyrelu::kGELU) {
+            matched_list_.push_back(&new_node);
+            status_ = kSuccess;
+            return true;
+          }

Review comment:
       The full set of supported activation types are `{'elu', 'gelu', 'leaky', 'prelu', 'rrelu', 'selu'}`. What about the rest of the activation types? Will they be supported by onednn in the future?




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

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



[GitHub] [incubator-mxnet] szha commented on a change in pull request #19971: [FEATURE] Fusing Leaky Relu operator in Fully Connected

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



##########
File path: src/operator/subgraph/mkldnn/mkldnn_fc_property.h
##########
@@ -102,6 +102,16 @@ class SgMKLDNNFCSelector : public SubgraphSelector {
             return true;
           }
         }
+        if (new_node.op() == Op::Get("LeakyReLU")) {
+          const LeakyReLUParam &param = nnvm::get<LeakyReLUParam>(new_node.attrs.parsed);
+          if (param.act_type == leakyrelu::kLeakyReLU ||
+              param.act_type == leakyrelu::kELU ||
+              param.act_type == leakyrelu::kGELU) {
+            matched_list_.push_back(&new_node);
+            status_ = kSuccess;
+            return true;
+          }

Review comment:
       The full set of supported activation types are `{'elu', 'gelu', 'leaky', 'prelu', 'rrelu', 'selu'}`. What about the rest of the activation types?




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

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



[GitHub] [incubator-mxnet] agrabows commented on pull request #19971: [FEATURE] Fusing Leaky Relu operator in Fully Connected

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


   @mxnet-bot run ci [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.

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



[GitHub] [incubator-mxnet] mxnet-bot commented on pull request #19971: [FEATURE] Fusing Leaky Relu operator in Fully Connected

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


   Jenkins CI successfully triggered : [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.

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



[GitHub] [incubator-mxnet] szha merged pull request #19971: [FEATURE] Fusing Leaky Relu operator in Fully Connected

Posted by GitBox <gi...@apache.org>.
szha merged pull request #19971:
URL: https://github.com/apache/incubator-mxnet/pull/19971


   


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

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



[GitHub] [incubator-mxnet] agrabows commented on a change in pull request #19971: [FEATURE] Fusing Leaky Relu operator in Fully Connected

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



##########
File path: src/operator/subgraph/mkldnn/mkldnn_fc_property.h
##########
@@ -102,6 +102,16 @@ class SgMKLDNNFCSelector : public SubgraphSelector {
             return true;
           }
         }
+        if (new_node.op() == Op::Get("LeakyReLU")) {
+          const LeakyReLUParam &param = nnvm::get<LeakyReLUParam>(new_node.attrs.parsed);
+          if (param.act_type == leakyrelu::kLeakyReLU ||
+              param.act_type == leakyrelu::kELU ||
+              param.act_type == leakyrelu::kGELU) {
+            matched_list_.push_back(&new_node);
+            status_ = kSuccess;
+            return true;
+          }

Review comment:
       Those were activation types that can be easily fused with FC in this PR. We plan to enable other activation fuses in the next PR as they need different approach.




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

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



[GitHub] [incubator-mxnet] mxnet-bot commented on pull request #19971: Fusing Leaky Relu operator in Fully Connected

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


   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**: [clang, sanity, centos-cpu, centos-gpu, miscellaneous, edge, website, windows-cpu, windows-gpu, unix-gpu, unix-cpu]
   *** 
   _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.

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