From 4f555909cedc4af94e74f3ad5c5a5c09ebc4792d Mon Sep 17 00:00:00 2001 From: Yan Chunwei Date: Thu, 5 Jul 2018 09:18:02 +0800 Subject: [PATCH] analysis/code clean (#11964) --- paddle/fluid/inference/analysis/README.md | 3 ++- paddle/fluid/inference/analysis/pass.h | 13 ------------- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/paddle/fluid/inference/analysis/README.md b/paddle/fluid/inference/analysis/README.md index 6fd73958bc..70adb4a974 100644 --- a/paddle/fluid/inference/analysis/README.md +++ b/paddle/fluid/inference/analysis/README.md @@ -54,4 +54,5 @@ It can be used as a helper class that draws the modified graph after each pass. There is some helper legacy/function/class for analysis. - [dot.h](./dot.h) give a easy to use interface for generating `DOT` codes, -- [graph_traits.h](./graph_traits.h) contains the graph traversal algorithms, it uses `iterator` to make the algorithms easy to share across different passes. +- [graph_traits.h](./graph_traits.h) contains the interfaces of the graph traversal algorithms, it uses `iterator`to make the algorithms easy to share across different passes, +there are some implementations in [data_flow_graph.cc](./data_flow_graph.cc) , such as BFS and DFS.. diff --git a/paddle/fluid/inference/analysis/pass.h b/paddle/fluid/inference/analysis/pass.h index 25c566ebfa..6b4dbb3bb5 100644 --- a/paddle/fluid/inference/analysis/pass.h +++ b/paddle/fluid/inference/analysis/pass.h @@ -32,19 +32,6 @@ class Pass { public: Pass() = default; virtual ~Pass() = default; - // Virtual method overridden by subclasses to do only necessary initialization - // before any pass is run. - // virtual bool Initialize() { return false; } - // There is some passes such as FlowToDataFlowGraphPass that needs a - // ProgramDesc. Here use the native ProgramDesc ProtoBuf message, so that it - // only couple with the proto file. - // virtual bool Initialize(const framework::proto::ProgramDesc &desc) { return - // false; } - // There are some Passes such as DataFlowGraphToFluidPass that will output a - // ProgramDesc. - // virtual bool Initialize(framework::proto::ProgramDesc *desc) { return - // false; } - // Mutable Pass. virtual bool Initialize(Argument *argument) { return false; } // Readonly Pass. -- GitLab