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:02 UTC
[incubator-mxnet] 01/04: invalidate outputs for imperative.
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.