- memcpy was missing the array size.
- modified the unit test to verify that the execution plan is
trivial on first delegate invocation.
PiperOrigin-RevId:
185569606
static_assert(sizeof(plan_cache_->data[0]) == sizeof(execution_plan_[0]),
"TfLiteIntArray and execution_plan do not contain same type.");
memcpy(plan_cache_->data, execution_plan_.data(),
- sizeof(plan_cache_->data[0]));
+ sizeof(plan_cache_->data[0]) * execution_plan_.size());
return kTfLiteOk;
}
for (int exec_index = 0; exec_index < execution_plan->size;
exec_index++) {
int node_index = execution_plan->data[exec_index];
+ // Check that we are an identity map to start.
+ TFLITE_CHECK_EQ(exec_index, node_index);
TfLiteNode* node;
TfLiteRegistration* reg;
context->GetNodeAndRegistration(context, node_index, &node, ®);