|
|
@ -17,6 +17,7 @@ limitations under the License. */
|
|
|
|
#include <map>
|
|
|
|
#include <map>
|
|
|
|
#include <memory>
|
|
|
|
#include <memory>
|
|
|
|
#include <string>
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
#include <unordered_set>
|
|
|
|
#include <vector>
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
|
|
|
|
#include "paddle/fluid/framework/ir/node.h"
|
|
|
|
#include "paddle/fluid/framework/ir/node.h"
|
|
|
@ -199,7 +200,12 @@ class Graph {
|
|
|
|
// WARN: After a series of passes, the current graph can be quite
|
|
|
|
// WARN: After a series of passes, the current graph can be quite
|
|
|
|
// different from OriginProgram. Caller shouldn't assume much from
|
|
|
|
// different from OriginProgram. Caller shouldn't assume much from
|
|
|
|
// the returned OriginProgram.
|
|
|
|
// the returned OriginProgram.
|
|
|
|
const ProgramDesc &OriginProgram() const { return program_; }
|
|
|
|
const ProgramDesc &OriginProgram() const {
|
|
|
|
|
|
|
|
LOG(WARNING) << "WARN: After a series of passes, the current graph can be "
|
|
|
|
|
|
|
|
"quite different from OriginProgram. So, please avoid "
|
|
|
|
|
|
|
|
"using the `OriginProgram()` method!";
|
|
|
|
|
|
|
|
return program_;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// This method takes ownership of `node`.
|
|
|
|
// This method takes ownership of `node`.
|
|
|
|
ir::Node *AddNode(ir::Node *node) {
|
|
|
|
ir::Node *AddNode(ir::Node *node) {
|
|
|
|