micro: replace ReportError() with TF_LITE_KERNEL_LOG macro
Replace naked calls to ReportError() with the TF_LITE_KERNEL_LOG macro to satisfy an internal CI check, even though this file is not presently included in the build.
This commit is contained in:
parent
88f5e7a3e0
commit
c4d0fd2ca1
@ -41,7 +41,8 @@ TfLiteStatus ResizeOutputImpl(TfLiteContext* context, const TfLiteTensor* dims,
|
||||
T data = GetTensorData<T>(dims)[i];
|
||||
if (data < 0) {
|
||||
TfLiteIntArrayFree(output_shape);
|
||||
context->ReportError(context, "Fill dimensions must be >= 0", dims->type);
|
||||
TF_LITE_KERNEL_LOG(context, "Fill dimensions must be >= 0",
|
||||
TfLiteTypeGetName(dims->type));
|
||||
return kTfLiteError;
|
||||
}
|
||||
output_shape->data[i] = data;
|
||||
@ -57,11 +58,10 @@ TfLiteStatus ResizeOutput(TfLiteContext* context, const TfLiteTensor* dims,
|
||||
case kTfLiteInt64:
|
||||
return ResizeOutputImpl<int64_t>(context, dims, output);
|
||||
default:
|
||||
context->ReportError(
|
||||
TF_LITE_KERNEL_LOG(
|
||||
context,
|
||||
"Fill only currently supports int32, int64 for input 0, "
|
||||
"got %d.",
|
||||
dims->type);
|
||||
"Fill only currently supports int32, int64 for input 0, got %s.",
|
||||
TfLiteTypeGetName(dims->type));
|
||||
return kTfLiteError;
|
||||
}
|
||||
}
|
||||
@ -148,11 +148,11 @@ TfLiteStatus Eval(TfLiteContext* context, TfLiteNode* node) {
|
||||
FillString(value, output);
|
||||
break;
|
||||
default:
|
||||
context->ReportError(
|
||||
TF_LITE_KERNEL_LOG(
|
||||
context,
|
||||
"Fill only currently supports int32, int64, float32, bool, string "
|
||||
"for input 1, got %d.",
|
||||
value->type);
|
||||
TfLiteTypeGetName(value->type));
|
||||
return kTfLiteError;
|
||||
}
|
||||
#undef TF_LITE_FILL
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user