From 61ae88b7604a9ed4edb77700efe932f79c0f49ef Mon Sep 17 00:00:00 2001 From: Tao Luo Date: Sat, 1 Dec 2018 19:24:36 +0800 Subject: [PATCH] Revert "Fix for accuracy problem for inplace operators when MKL-DNN mode is enabled" --- paddle/fluid/framework/operator.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/paddle/fluid/framework/operator.cc b/paddle/fluid/framework/operator.cc index 50a748ba029..8bfdf389120 100644 --- a/paddle/fluid/framework/operator.cc +++ b/paddle/fluid/framework/operator.cc @@ -754,7 +754,7 @@ void OperatorWithKernel::RunImpl(const Scope& scope, kernel_iter->second(ExecutionContext(*this, exec_scope, *dev_ctx)); - if (run_by_executor_ && !transfered_inplace_vars.empty()) { + if (!transfered_inplace_vars.empty()) { // there is inplace variable has been transfered. TransferInplaceVarsBack(scope, transfered_inplace_vars, *transfer_scope); } @@ -776,7 +776,6 @@ void OperatorWithKernel::RunImpl(const Scope& scope, } } } - void OperatorWithKernel::TransferInplaceVarsBack( const Scope& scope, const std::vector& inplace_vars, const Scope& transfer_scope) const { -- GitLab