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

Function GenericPrepare

tensorflow/lite/delegates/flex/kernel_test.cc:30–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28using ::testing::ElementsAreArray;
29
30TfLiteStatus GenericPrepare(TfLiteContext* context, TfLiteDelegate* delegate,
31 const std::vector<int>& supported_nodes) {
32 TfLiteIntArray* size_and_nodes =
33 ConvertVectorToTfLiteIntArray(supported_nodes);
34 TF_LITE_ENSURE_STATUS(context->ReplaceNodeSubsetsWithDelegateKernels(
35 context, flex::GetKernel(), size_and_nodes, delegate));
36 TfLiteIntArrayFree(size_and_nodes);
37 return kTfLiteOk;
38}
39
40// There is no easy way to pass a parameter into the TfLiteDelegate's
41// 'prepare' function, so we keep a global map for testing purpused.

Callers 2

GetPrepareFunctionMethod · 0.70
TEST_FFunction · 0.70

Calls 4

TfLiteIntArrayFreeFunction · 0.85
GetKernelFunction · 0.70

Tested by

no test coverage detected