You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by jx...@apache.org on 2018/04/26 04:41:01 UTC

[incubator-mxnet] branch master updated (0cd082b -> 8b91bce)

This is an automated email from the ASF dual-hosted git repository.

jxie pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git.


    from 0cd082b  fix for asymmetric padding (#10676)
     new a5d7893  invalidate outputs for imperative.
     new 860bfa8  Invalidate all MKLDNN memory for reused NDArray.
     new b428937  Revert "invalidate outputs for imperative."
     new 8b91bce  remove mkldnn memory invalidation in graph execution.

The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 include/mxnet/ndarray.h | 3 +++
 src/common/exec_utils.h | 3 ---
 2 files changed, 3 insertions(+), 3 deletions(-)

-- 
To stop receiving notification emails like this one, please contact
jxie@apache.org.

[incubator-mxnet] 04/04: remove mkldnn memory invalidation in graph execution.

Posted by jx...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jxie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git

commit 8b91bce2da915c92203c39120b58c98c945fd1fa
Author: Da Zheng <zh...@gmail.com>
AuthorDate: Wed Apr 25 18:07:26 2018 -0700

    remove mkldnn memory invalidation in graph execution.
---
 src/common/exec_utils.h | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/src/common/exec_utils.h b/src/common/exec_utils.h
index 29537d3..3ac86fb 100644
--- a/src/common/exec_utils.h
+++ b/src/common/exec_utils.h
@@ -86,9 +86,6 @@ inline bool SetupDefaultBlobsOut(const std::vector<NDArray>& src,
     auto& nd = src[i];
     bool is_default = nd.storage_type() == kDefaultStorage;
 #if MXNET_USE_MKLDNN == 1
-    // If it's writeTo, we don't need to worry whether it contains valid data.
-    if (req[i] == kWriteTo && is_default)
-      const_cast<NDArray &>(nd).InvalidateMKLDNNData();
     // We have to make sure it's default storage and default layout.
     is_default = nd.IsDefaultData();
 #endif

-- 
To stop receiving notification emails like this one, please contact
jxie@apache.org.

[incubator-mxnet] 01/04: invalidate outputs for imperative.

Posted by jx...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jxie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git

commit a5d7893511d80f76b6dc0f8ee03e6aee3ff98fc1
Author: Da Zheng <zh...@gmail.com>
AuthorDate: Tue Apr 24 20:29:31 2018 +0000

    invalidate outputs for imperative.
---
 src/imperative/imperative_utils.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/imperative/imperative_utils.h b/src/imperative/imperative_utils.h
index 0d6525d..33ba72f 100644
--- a/src/imperative/imperative_utils.h
+++ b/src/imperative/imperative_utils.h
@@ -29,6 +29,7 @@
 #include "../c_api/c_api_common.h"
 #include "../common/utils.h"
 #include "../common/exec_utils.h"
+#include "../operator/nn/mkldnn/mkldnn_base-inl.h"
 
 #ifndef MXNET_IMPERATIVE_IMPERATIVE_UTILS_H_
 #define MXNET_IMPERATIVE_IMPERATIVE_UTILS_H_
@@ -402,6 +403,9 @@ inline void PushFComputeEx(const FComputeEx& fn,
   DerefInputOutput(p_inputs, p_outputs, &inputs, &outputs);
   const auto& run = [=](RunContext rctx) {
       OpContext opctx{is_train, rctx, engine::CallbackOnComplete(), requested};
+#if MXNET_USE_MKLDNN == 1
+      InvalidateOutputs(outputs, req);
+#endif
       fn(attrs, opctx, inputs, req, outputs);
       if (ctx.dev_mask() == gpu::kDevMask && exec_type == ExecType::kSync) {
         rctx.get_stream<gpu>()->Wait();

-- 
To stop receiving notification emails like this one, please contact
jxie@apache.org.

[incubator-mxnet] 02/04: Invalidate all MKLDNN memory for reused NDArray.

Posted by jx...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jxie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git

commit 860bfa8aa8e885b455c0a2e49b0980e899252ee6
Author: Da Zheng <zh...@gmail.com>
AuthorDate: Wed Apr 25 16:08:00 2018 -0700

    Invalidate all MKLDNN memory for reused NDArray.
---
 include/mxnet/ndarray.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/include/mxnet/ndarray.h b/include/mxnet/ndarray.h
index e172279..6fda8c3 100644
--- a/include/mxnet/ndarray.h
+++ b/include/mxnet/ndarray.h
@@ -506,6 +506,9 @@ class NDArray {
     ret.shape_ = shape;
     ret.dtype_ = dtype;
     ret.reuse_ = true;
+#if MXNET_USE_MKLDNN == 1
+    ret.InvalidateMKLDNNData();
+#endif
     return ret;
   }
 

-- 
To stop receiving notification emails like this one, please contact
jxie@apache.org.

[incubator-mxnet] 03/04: Revert "invalidate outputs for imperative."

Posted by jx...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jxie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git

commit b428937968adf177e0260361c972e502e839edb5
Author: Da Zheng <zh...@gmail.com>
AuthorDate: Wed Apr 25 17:37:03 2018 -0700

    Revert "invalidate outputs for imperative."
    
    This reverts commit f3226e1c82410e5e13a1294d947d339ea781f62e.
---
 src/imperative/imperative_utils.h | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/src/imperative/imperative_utils.h b/src/imperative/imperative_utils.h
index 33ba72f..0d6525d 100644
--- a/src/imperative/imperative_utils.h
+++ b/src/imperative/imperative_utils.h
@@ -29,7 +29,6 @@
 #include "../c_api/c_api_common.h"
 #include "../common/utils.h"
 #include "../common/exec_utils.h"
-#include "../operator/nn/mkldnn/mkldnn_base-inl.h"
 
 #ifndef MXNET_IMPERATIVE_IMPERATIVE_UTILS_H_
 #define MXNET_IMPERATIVE_IMPERATIVE_UTILS_H_
@@ -403,9 +402,6 @@ inline void PushFComputeEx(const FComputeEx& fn,
   DerefInputOutput(p_inputs, p_outputs, &inputs, &outputs);
   const auto& run = [=](RunContext rctx) {
       OpContext opctx{is_train, rctx, engine::CallbackOnComplete(), requested};
-#if MXNET_USE_MKLDNN == 1
-      InvalidateOutputs(outputs, req);
-#endif
       fn(attrs, opctx, inputs, req, outputs);
       if (ctx.dev_mask() == gpu::kDevMask && exec_type == ExecType::kSync) {
         rctx.get_stream<gpu>()->Wait();

-- 
To stop receiving notification emails like this one, please contact
jxie@apache.org.