diff --git a/paddle/fluid/framework/ir/expected_kernel_cache_pass.cc b/paddle/fluid/framework/ir/expected_kernel_cache_pass.cc index 28db7dc55992b8f05c5a0a404fa677d8023312f9..ee67af0aff5c90a9da0ece8f197d9a0c0a8e5b9c 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 738eb84fd91afaaa5b841b43d58323db90a6f304..bf0907d3feb7bccd163363da65505e0af3fb9bf6 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