From 695f2db6a0ab874edb513d0e7f9d11f180637606 Mon Sep 17 00:00:00 2001 From: luotao1 Date: Thu, 4 Apr 2019 14:44:45 +0800 Subject: [PATCH] update expected_kernel_cache_pass test=develop --- paddle/fluid/framework/ir/expected_kernel_cache_pass.cc | 4 +--- paddle/fluid/framework/ir/expected_kernel_cache_pass.h | 3 +-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/paddle/fluid/framework/ir/expected_kernel_cache_pass.cc b/paddle/fluid/framework/ir/expected_kernel_cache_pass.cc index 28db7dc5599..ee67af0aff5 100644 --- a/paddle/fluid/framework/ir/expected_kernel_cache_pass.cc +++ b/paddle/fluid/framework/ir/expected_kernel_cache_pass.cc @@ -20,15 +20,13 @@ namespace paddle { namespace framework { namespace ir { -std::unique_ptr ExpectedKernelCachePass::ApplyImpl( - std::unique_ptr graph) const { +void ExpectedKernelCachePass::ApplyImpl(ir::Graph* graph) const { VLOG(3) << "Applies Expected Kernel Cache strategy."; for (const Node* n : graph->Nodes()) { if (n->IsOp()) { n->Op()->SetAttr(kEnableCacheExpectedKernel, true); } } - return graph; } } // namespace ir diff --git a/paddle/fluid/framework/ir/expected_kernel_cache_pass.h b/paddle/fluid/framework/ir/expected_kernel_cache_pass.h index 738eb84fd91..bf0907d3feb 100644 --- a/paddle/fluid/framework/ir/expected_kernel_cache_pass.h +++ b/paddle/fluid/framework/ir/expected_kernel_cache_pass.h @@ -23,8 +23,7 @@ namespace ir { class ExpectedKernelCachePass : public Pass { protected: - std::unique_ptr ApplyImpl( - std::unique_ptr graph) const override; + void ApplyImpl(ir::Graph* graph) const override; }; } // namespace ir -- GitLab