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.
| 88 | // we are testing and handles memory management and conversion to |
| 89 | // TfLiteIntArray. Populates `subgraphs` with resulting generated subgraphs. |
| 90 | void 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. |
| 101 | void CheckPartitionSubgraphs( |
no test coverage detected