message: More info on op prepare/eval failures
diff: @@ -40,6 +40,16 @@ class NNAPIDelegate {};
  namespace {
  +TfLiteStatus ReportOpError(TfLiteContext* context, const TfLiteNode& node,
  + const TfLiteRegistration& registration,
  + int node_index, const char* message) {
  + context->ReportError(context, "Node number %d (%s) %s.\n", node_index,
  + EnumNameBuiltinOperator(static_cast<BuiltinOperator>(
  + registration.builtin_code)),
  + message);
  + return kTfLiteError;
  +}
  +
  // Stub method which returns kTfLiteError when the function is forbidden.
  // We're registrating this function to several different function to save
  // compiled binary size. Please note the restrictions:
  @@ -572,9 +582,8 @@ TfLiteStatus Interpreter::PrepareOpsStartingAt(
  nodes_and_registration_[node_index].second;
  EnsureTensorsVectorCapacity();
  if (OpPrepare(registration, &node) == kTfLiteError) {
  - context_.ReportError(&context_, "Node %d failed to prepare.\n",
  - node_index);
  - return kTfLiteError;
  + return ReportOpError(&context_, node, registration, node_index,
  + "failed to prepare");
  }
  *last_execution_plan_index_prepared = execution_plan_index;
  @@ -674,9 +683,8 @@ TfLiteStatus Interpreter::Invoke() {
  EnsureTensorsVectorCapacity();
  tensor_resized_since_op_invoke_ = false;
  if (OpInvoke(registration, &node) == kTfLiteError) {
  - context_.ReportError(&context_, "Node %d failed to invoke.\n",
  - node_index);
  - status = kTfLiteError;
  + status = ReportOpError(&context_, node, registration, node_index,
  + "failed to invoke");
  }
  // Force execution prep for downstream ops if the latest op triggered the
  