Skip to content

Commit 4c88c3f

Browse files
committed
Sync from upstream TF.
1 parent 686df2d commit 4c88c3f

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

tensorflow/lite/core/api/flatbuffer_conversions.cc

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -470,6 +470,10 @@ TfLiteStatus ParseOpDataTfLite(const Operator* op, BuiltinOperator op_type,
470470
builtin_data);
471471
}
472472

473+
case BuiltinOperator_REVERSE_V2: {
474+
return ParseReverseV2(op, error_reporter, allocator, builtin_data);
475+
}
476+
473477
case BuiltinOperator_ROUND: {
474478
return ParseRound(op, error_reporter, allocator, builtin_data);
475479
}
@@ -1006,7 +1010,6 @@ TfLiteStatus ParseOpDataTfLite(const Operator* op, BuiltinOperator op_type,
10061010
case BuiltinOperator_REAL:
10071011
case BuiltinOperator_RFFT2D:
10081012
case BuiltinOperator_SEGMENT_SUM:
1009-
case BuiltinOperator_REVERSE_V2:
10101013
case BuiltinOperator_UNSORTED_SEGMENT_MAX:
10111014
case BuiltinOperator_UNSORTED_SEGMENT_MIN:
10121015
case BuiltinOperator_UNSORTED_SEGMENT_PROD:
@@ -2467,6 +2470,14 @@ TfLiteStatus ParseStablehloCase(const Operator* op,
24672470
return kTfLiteError;
24682471
}
24692472

2473+
// We have this parse function instead of directly returning kTfLiteOk from the
2474+
// switch-case in ParseOpData because this function is used as part of the
2475+
// selective registration for the OpResolver implementation in micro.
2476+
TfLiteStatus ParseReverseV2(const Operator*, ErrorReporter*,
2477+
BuiltinDataAllocator*, void**) {
2478+
return kTfLiteOk;
2479+
}
2480+
24702481
// We have this parse function instead of directly returning kTfLiteOk from the
24712482
// switch-case in ParseOpData because this function is used as part of the
24722483
// selective registration for the OpResolver implementation in micro.

tensorflow/lite/core/api/flatbuffer_conversions.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,10 @@ TfLiteStatus ParseResizeNearestNeighbor(const Operator* op,
318318
BuiltinDataAllocator* allocator,
319319
void** builtin_data);
320320

321+
TfLiteStatus ParseReverseV2(const Operator* op, ErrorReporter* error_reporter,
322+
BuiltinDataAllocator* allocator,
323+
void** builtin_data);
324+
321325
TfLiteStatus ParseRound(const Operator* op, ErrorReporter* error_reporter,
322326
BuiltinDataAllocator* allocator, void** builtin_data);
323327

0 commit comments

Comments
 (0)