MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / CheckPartitionSubgraphs

Function CheckPartitionSubgraphs

tensorflow/lite/graph_info_test.cc:101–114  ·  view source on GitHub ↗

Check a generated list of subgraphs against the expected list of subgraphs.

Source from the content-addressed store, hash-verified

99
100// Check a generated list of subgraphs against the expected list of subgraphs.
101void CheckPartitionSubgraphs(
102 const std::vector<NodeSubset>& generated_subgraphs,
103 const std::vector<NodeSubset>& expected_subgraphs) {
104 ASSERT_EQ(generated_subgraphs.size(), expected_subgraphs.size());
105 for (size_t subgraph_index = 0; subgraph_index < generated_subgraphs.size();
106 subgraph_index++) {
107 EXPECT_EQ(generated_subgraphs[subgraph_index].nodes,
108 expected_subgraphs[subgraph_index].nodes);
109 EXPECT_EQ(generated_subgraphs[subgraph_index].input_tensors,
110 expected_subgraphs[subgraph_index].input_tensors);
111 EXPECT_EQ(generated_subgraphs[subgraph_index].output_tensors,
112 expected_subgraphs[subgraph_index].output_tensors);
113 }
114}
115
116// Test an empty trivial graph with no partitions.
117TEST(PartitionTest, Nodes0PartitionNodes0) {

Callers 1

TESTFunction · 0.85

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected