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

Function PartitionGraph

tensorflow/lite/graph_info_test.cc:90–98  ·  view source on GitHub ↗

Partition a graph to generate a list of subgraphs. This wraps the API call we are testing and handles memory management and conversion to TfLiteIntArray. Populates `subgraphs` with resulting generated subgraphs.

Source from the content-addressed store, hash-verified

88// we are testing and handles memory management and conversion to
89// TfLiteIntArray. Populates `subgraphs` with resulting generated subgraphs.
90void PartitionGraph(const SimpleTestGraph& graph,
91 const std::vector<int>& nodes_to_partition,
92 std::vector<NodeSubset>* subgraphs) {
93 TfLiteIntArray* nodes_to_partition_int_array =
94 ConvertVector(nodes_to_partition);
95 PartitionGraphIntoIndependentNodeSubsets(&graph, nodes_to_partition_int_array,
96 subgraphs);
97 TfLiteIntArrayFree(nodes_to_partition_int_array);
98}
99
100// Check a generated list of subgraphs against the expected list of subgraphs.
101void CheckPartitionSubgraphs(

Callers 1

TESTFunction · 0.85

Calls 3

ConvertVectorFunction · 0.85
TfLiteIntArrayFreeFunction · 0.85

Tested by

no test coverage detected