|
|
@ -21,6 +21,10 @@ namespace paddle {
|
|
|
|
namespace framework {
|
|
|
|
namespace framework {
|
|
|
|
namespace ir {
|
|
|
|
namespace ir {
|
|
|
|
namespace {
|
|
|
|
namespace {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// The function keeps the graph consistent by replacing
|
|
|
|
|
|
|
|
// a node 'from' in the set of inputs nodes
|
|
|
|
|
|
|
|
// of the visited node by a node 'to'.
|
|
|
|
void CorrectGraphEdges(Graph* graph, Node* from, Node* to) {
|
|
|
|
void CorrectGraphEdges(Graph* graph, Node* from, Node* to) {
|
|
|
|
for (auto& node : GraphTraits::DFS(*graph)) {
|
|
|
|
for (auto& node : GraphTraits::DFS(*graph)) {
|
|
|
|
auto from_in_inputs =
|
|
|
|
auto from_in_inputs =
|
|
|
|