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 2019/05/09 08:20:30 UTC

[GitHub] [incubator-mxnet] pengzhao-intel commented on a change in pull request #14914: Add primitive cache for MKL-DNN sum(elemwise_add operator

pengzhao-intel commented on a change in pull request #14914: Add primitive cache for MKL-DNN sum(elemwise_add operator
URL: https://github.com/apache/incubator-mxnet/pull/14914#discussion_r282383011
 
 

 ##########
 File path: src/operator/tensor/elemwise_binary_op_basic.cc
 ##########
 @@ -30,6 +30,12 @@
 namespace mxnet {
 namespace op {
 
+bool SupportMKLDNNSum(const NDArray& input) {
+  int ndim = input.shape().ndim();
+  return input.dtype() == mshadow::kFloat32 && (ndim >= 1 && ndim <= 4) &&
+         input.storage_type() == kDefaultStorage;
+}
 
 Review comment:
   Why don't put this function into `mkldnn_base-inl.h`?

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


With regards,
Apache Git Services