diff --git a/paddle/fluid/framework/ir/graph_helper.cc b/paddle/fluid/framework/ir/graph_helper.cc index b2ab6bed36c3afbe99c8debd8547784fb455475f..83bed2a97baa7453ac84039405ad43a20a12a4bd 100644 --- a/paddle/fluid/framework/ir/graph_helper.cc +++ b/paddle/fluid/framework/ir/graph_helper.cc @@ -603,9 +603,9 @@ static std::vector> GetOpDependencies( for (const auto *op_desc : block_ops) { size_t op_idx = op_id_to_idx.size(); PADDLE_ENFORCE_EQ( - op_id_to_idx.emplace(op_desc->Id(), op_idx).second, true, + op_id_to_idx.emplace(op_desc->OriginalId(), op_idx).second, true, platform::errors::InvalidArgument( - "There should not be duplicate op id: %d", op_desc->Id())); + "There should not be duplicate op id: %d", op_desc->OriginalId())); } std::vector> dep_matrix(op_num); @@ -624,9 +624,9 @@ static std::vector> GetOpDependencies( for (const auto &pair : all_preceding_ops) { const auto *cur_op_node = pair.first; - size_t op_idx_1 = get_op_idx_by_id(cur_op_node->Op()->Id()); + size_t op_idx_1 = get_op_idx_by_id(cur_op_node->Op()->OriginalId()); for (const auto *preceding_op_node : pair.second) { - size_t op_idx_2 = get_op_idx_by_id(preceding_op_node->Op()->Id()); + size_t op_idx_2 = get_op_idx_by_id(preceding_op_node->Op()->OriginalId()); dep_matrix[op_idx_1][op_idx_2] = ir::Node::Dep::kAfter; dep_matrix[op_idx_2][op_idx_1] = ir::Node::Dep::kBefore; } diff --git a/python/paddle/fluid/tests/unittests/distributed_passes/CMakeLists.txt b/python/paddle/fluid/tests/unittests/distributed_passes/CMakeLists.txt index 48a9f7204aa8d26090d1b4e9a059cad7f382612f..b3ba7c80b32265912c746db4fed76773e127255f 100755 --- a/python/paddle/fluid/tests/unittests/distributed_passes/CMakeLists.txt +++ b/python/paddle/fluid/tests/unittests/distributed_passes/CMakeLists.txt @@ -4,6 +4,6 @@ string(REPLACE ".py" "" TEST_OPS "${TEST_OPS}") foreach(TEST_OP ${TEST_OPS}) py_test_modules(${TEST_OP} MODULES ${TEST_OP}) list(APPEND DIST_TEST_OPS ${TEST_OP}) - set_tests_properties(${TEST_OP} PROPERTIES TIMEOUT 90) + set_tests_properties(${TEST_OP} PROPERTIES TIMEOUT 120) set_tests_properties(${TEST_OP} PROPERTIES LABELS "RUN_TYPE=DIST") endforeach(TEST_OP)