Browse Source

Temporarily disable ImmediateRePass

tags/v1.5.1
wq160 3 years ago
parent
commit
deecaf160a
2 changed files with 4 additions and 5 deletions
  1. +2
    -3
      ge/graph/passes/infer_base_pass.cc
  2. +2
    -2
      tests/ut/ge/graph/passes/infer_base_pass_unittest.cc

+ 2
- 3
ge/graph/passes/infer_base_pass.cc View File

@@ -84,9 +84,8 @@ Status InferBasePass::Run(NodePtr &node) {

bool InferBasePass::NeedInfer(const NodePtr &node) const { return true; }
void InferBasePass::AddChangedNodesImmediateRepass(const std::set<NodePtr> &changed_nodes) {
for (const auto &node_ele : changed_nodes) {
AddImmediateRePassNode(node_ele);
}
// need passed_nodes set to solve the problem that multi-input operators do repass in advance.
// when there is passed_nodes set, wo should call AddImmediateRePassNode for all nodes in changed_nodes.
}

graphStatus InferBasePass::InferAndUpdate(NodePtr &node, bool before_subgraph, std::set<NodePtr> &changed_nodes) {


+ 2
- 2
tests/ut/ge/graph/passes/infer_base_pass_unittest.cc View File

@@ -255,7 +255,7 @@ TEST_F(UtestGraphInferBasePassStub, AddCurNodeRepass_NotCallUpdatePeerNode_WhenI
EXPECT_EQ(stub_base_pass.Run(add_node), SUCCESS);
EXPECT_EQ(stub_base_pass.call_infer_times, 1);
EXPECT_EQ(stub_base_pass.call_update_tensor_desc_times, 0);
EXPECT_EQ(stub_base_pass.GetNodesNeedRePassImmediately(), std::unordered_set<NodePtr>({add_node}));
// EXPECT_EQ(stub_base_pass.GetNodesNeedRePassImmediately(), std::unordered_set<NodePtr>({add_node}));
}

TEST_F(UtestGraphInferBasePassStub, NotAddPeerNodeRepass_AfterUpdatePeerNode_WhenUnchanged) {
@@ -291,7 +291,7 @@ TEST_F(UtestGraphInferBasePassStub, AddPeerNodeRepass_AfterUpdatePeerNode_WhenCh

EXPECT_EQ(stub_base_pass.Run(add_node), SUCCESS);
EXPECT_EQ(stub_base_pass.call_update_tensor_desc_times, 1);
EXPECT_EQ(stub_base_pass.GetNodesNeedRePassImmediately(), std::unordered_set<NodePtr>({netoutput}));
// EXPECT_EQ(stub_base_pass.GetNodesNeedRePassImmediately(), std::unordered_set<NodePtr>({netoutput}));
}

TEST_F(UtestGraphInferBasePassStub, TestUpdateSubgraphData_WhenBeforeSubgraph) {


Loading…
Cancel
Save