!37841 Fix ut testcase.

Merge pull request !37841 from gaoyong10/dynamic_shape_02
This commit is contained in:
i-robot 2022-07-13 01:39:54 +00:00 committed by Gitee
commit 82afff4811
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 2 additions and 2 deletions

View File

@ -2406,7 +2406,7 @@ CNodePtr SessionBasic::ConstructOutput(const AnfNodePtrList &outputs, const std:
}
MS_LOG(EXCEPTION) << "Can't find the node in the equiv map!";
};
output_args.push_back(NewValueNode(prim::kPrimMakeTuple));
output_args.push_back(mindspore::NewValueNode(std::make_shared<Primitive>(prim::kPrimMakeTuple->name())));
(void)std::transform(outputs.begin(), outputs.end(), std::back_inserter(output_args),
[&](const AnfNodePtr &out) -> AnfNodePtr { return FindEqu(out); });
auto output_node = graph->NewCNode(output_args);

View File

@ -168,7 +168,7 @@ TEST_F(GraphCompilerTest, CompileGraph) {
auto device_context = std::make_shared<TestADeviceContext>(device_context_key);
auto graph_id = compiler->CompileGraph(segment, outputs, device_context.get(), device::RunMode::kKernelMode, false);
const auto &kernel_graph = compiler->Fetch(graph_id);
ASSERT_EQ(3, kernel_graph->execution_order().size());
ASSERT_EQ(2, kernel_graph->execution_order().size());
}
} // namespace runtime
} // namespace mindspore