提交 695f2db6 编写于 作者: L luotao1

update expected_kernel_cache_pass

test=develop
上级 226596a2
...@@ -20,15 +20,13 @@ namespace paddle { ...@@ -20,15 +20,13 @@ namespace paddle {
namespace framework { namespace framework {
namespace ir { namespace ir {
std::unique_ptr<ir::Graph> ExpectedKernelCachePass::ApplyImpl( void ExpectedKernelCachePass::ApplyImpl(ir::Graph* graph) const {
std::unique_ptr<ir::Graph> graph) const {
VLOG(3) << "Applies Expected Kernel Cache strategy."; VLOG(3) << "Applies Expected Kernel Cache strategy.";
for (const Node* n : graph->Nodes()) { for (const Node* n : graph->Nodes()) {
if (n->IsOp()) { if (n->IsOp()) {
n->Op()->SetAttr(kEnableCacheExpectedKernel, true); n->Op()->SetAttr(kEnableCacheExpectedKernel, true);
} }
} }
return graph;
} }
} // namespace ir } // namespace ir
......
...@@ -23,8 +23,7 @@ namespace ir { ...@@ -23,8 +23,7 @@ namespace ir {
class ExpectedKernelCachePass : public Pass { class ExpectedKernelCachePass : public Pass {
protected: protected:
std::unique_ptr<ir::Graph> ApplyImpl( void ApplyImpl(ir::Graph* graph) const override;
std::unique_ptr<ir::Graph> graph) const override;
}; };
} // namespace ir } // namespace ir
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册