Skip to content

Commit be87caf

Browse files
gglin001yaozhixin
andauthored
fix random cache (#723) (#42621)
Co-authored-by: yaozhixin <522190855@qq.com>
1 parent c785512 commit be87caf

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

paddle/fluid/framework/ir/ipu/optimizer_extract_pass.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
#include "paddle/fluid/framework/ir/ipu/optimizer_extract_pass.h"
1616

17+
#include "paddle/fluid/framework/ir/graph_helper.h"
1718
#include "paddle/fluid/framework/ir/pass_tester_helper.h"
1819

1920
namespace paddle {
@@ -68,7 +69,7 @@ void IpuOptimizerExtractPass::ApplyImpl(ir::Graph* graph) const {
6869
std::vector<float> weight_decay_values{};
6970

7071
// use map store <op_type, op_ptr> ?
71-
for (auto* node : graph->Nodes()) {
72+
for (auto* node : TopologySortOperations(*graph)) {
7273
if (!node->IsOp()) {
7374
continue;
7475
}

0 commit comments

Comments
 (0)