Skip to content

Commit 2e88bbc

Browse files
authored
Sync from tflite-micro. (tensorflow#181)
1 parent 7120f3b commit 2e88bbc

File tree

3 files changed

+6
-11
lines changed

3 files changed

+6
-11
lines changed

src/tensorflow/lite/micro/kernels/micro_ops.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ TfLiteRegistration Register_TRANSPOSE();
113113
TfLiteRegistration Register_TRANSPOSE_CONV();
114114
// TODO(b/230666079): resolve conflict with xtensa implementation
115115
TfLiteRegistration Register_UNIDIRECTIONAL_SEQUENCE_LSTM();
116+
TfLiteRegistration Register_UNPACK();
116117
TfLiteRegistration Register_VAR_HANDLE();
117118
TfLiteRegistration Register_WHILE();
118119
TfLiteRegistration Register_ZEROS_LIKE();
@@ -130,7 +131,6 @@ TfLiteRegistration Register_RSQRT();
130131
TfLiteRegistration Register_SIN();
131132
TfLiteRegistration Register_SQRT();
132133
TfLiteRegistration Register_SQUARE();
133-
TfLiteRegistration Register_UNPACK();
134134
TfLiteRegistration Register_L2_NORMALIZATION();
135135
TfLiteRegistration Register_TANH();
136136

src/tensorflow/lite/micro/kernels/unpack.cpp

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright 2019 The TensorFlow Authors. All Rights Reserved.
1+
/* Copyright 2023 The TensorFlow Authors. All Rights Reserved.
22
33
Licensed under the Apache License, Version 2.0 (the "License");
44
you may not use this file except in compliance with the License.
@@ -21,9 +21,7 @@ limitations under the License.
2121
#include "tensorflow/lite/micro/micro_log.h"
2222

2323
namespace tflite {
24-
namespace ops {
25-
namespace micro {
26-
namespace unpack {
24+
2725
namespace {
2826

2927
constexpr int kInputTensor = 0;
@@ -100,13 +98,11 @@ TfLiteStatus Eval(TfLiteContext* context, TfLiteNode* node) {
10098

10199
return kTfLiteOk;
102100
}
101+
103102
} // namespace
104-
} // namespace unpack
105103

106104
TfLiteRegistration Register_UNPACK() {
107-
return tflite::micro::RegisterOp(nullptr, nullptr, unpack::Eval);
105+
return tflite::micro::RegisterOp(nullptr, nullptr, Eval);
108106
}
109107

110-
} // namespace micro
111-
} // namespace ops
112108
} // namespace tflite

src/tensorflow/lite/micro/micro_mutable_op_resolver.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -554,8 +554,7 @@ class MicroMutableOpResolver : public MicroOpResolver {
554554
}
555555

556556
TfLiteStatus AddUnpack() {
557-
return AddBuiltin(BuiltinOperator_UNPACK,
558-
tflite::ops::micro::Register_UNPACK(), ParseUnpack);
557+
return AddBuiltin(BuiltinOperator_UNPACK, Register_UNPACK(), ParseUnpack);
559558
}
560559

561560
TfLiteStatus AddUnidirectionalSequenceLSTM() {

0 commit comments

Comments
 (0)