You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by ha...@apache.org on 2018/10/10 01:16:50 UTC
[incubator-mxnet] branch master updated: Fix regression in MKLDNN
caused by PR 12019 (#12740)
This is an automated email from the ASF dual-hosted git repository.
haibin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git
The following commit(s) were added to refs/heads/master by this push:
new ddddede Fix regression in MKLDNN caused by PR 12019 (#12740)
ddddede is described below
commit ddddede24ee558a8b1f69713ad195cd7d37665c0
Author: Alexander Zai <az...@gmail.com>
AuthorDate: Tue Oct 9 18:16:39 2018 -0700
Fix regression in MKLDNN caused by PR 12019 (#12740)
* add flag to elementwise_add
* fix flatteng
* retrigger
---
src/operator/tensor/elemwise_binary_op_basic.cc | 4 ++++
src/operator/tensor/matrix_op.cc | 1 +
2 files changed, 5 insertions(+)
diff --git a/src/operator/tensor/elemwise_binary_op_basic.cc b/src/operator/tensor/elemwise_binary_op_basic.cc
index 884a1dd..339290d 100644
--- a/src/operator/tensor/elemwise_binary_op_basic.cc
+++ b/src/operator/tensor/elemwise_binary_op_basic.cc
@@ -76,6 +76,9 @@ static inline bool ElemwiseAddStorageType(const nnvm::NodeAttrs& attrs,
MXNET_OPERATOR_REGISTER_BINARY(elemwise_add)
.set_attr<FInferStorageType>("FInferStorageType", ElemwiseAddStorageType)
.set_attr<FCompute>("FCompute<cpu>", ElemwiseBinaryOp::Compute<cpu, op::mshadow_op::plus>)
+#if MXNET_USE_MKLDNN == 1
+.set_attr<bool>("TIsMKLDNN", true)
+#endif
.set_attr<FComputeEx>("FComputeEx<cpu>", ElemwiseAddEx)
.set_attr<FResourceRequest>("FResourceRequest", /* For Sparse CSR */
[](const NodeAttrs& attrs) {
@@ -156,6 +159,7 @@ NNVM_REGISTER_OP(_backward_add)
.set_attr<FResourceRequest>("FResourceRequest", [](const NodeAttrs& n) {
return std::vector<ResourceRequest>{ResourceRequest::kTempSpace};
})
+.set_attr<bool>("TIsMKLDNN", true)
#endif
.set_attr<FCompute>("FCompute<cpu>", ElemwiseBinaryOp::BackwardUseNone<
cpu, mshadow_op::identity, mshadow_op::identity>)
diff --git a/src/operator/tensor/matrix_op.cc b/src/operator/tensor/matrix_op.cc
index ffdc228..77d9bf0 100644
--- a/src/operator/tensor/matrix_op.cc
+++ b/src/operator/tensor/matrix_op.cc
@@ -266,6 +266,7 @@ Example::
.set_attr<FCompute>("FCompute<cpu>", UnaryOp::IdentityCompute<cpu>)
.set_attr<FComputeEx>("FComputeEx<cpu>", FlattenEx)
#if MXNET_USE_MKLDNN == 1
+.set_attr<bool>("TIsMKLDNN", true)
.set_attr<FResourceRequest>("FResourceRequest", [](const NodeAttrs& n) {
return std::vector<ResourceRequest>{ResourceRequest::kTempSpace};
})