Internal change
PiperOrigin-RevId: 302788839 Change-Id: I35965d35a48fbdf977402ff67372bb057bcf730a
This commit is contained in:
parent
81c04df968
commit
deb1d63ca4
@ -718,6 +718,7 @@ def tflite_experimental_runtime_linkopts(if_eager = [], if_non_eager = [], if_no
|
||||
if_eager = [
|
||||
# "//tensorflow/lite/experimental/tf_runtime:eager_interpreter",
|
||||
# "//tensorflow/lite/experimental/tf_runtime:eager_model",
|
||||
# "//tensorflow/lite/experimental/tf_runtime:subgraph",
|
||||
] + if_eager,
|
||||
if_non_eager = [
|
||||
# "//tensorflow/lite/experimental/tf_runtime:interpreter",
|
||||
|
@ -29,6 +29,10 @@ limitations under the License.
|
||||
#include "tensorflow/lite/memory_planner.h"
|
||||
#include "tensorflow/lite/util.h"
|
||||
|
||||
#if TFLITE_EXPERIMENTAL_RUNTIME_EAGER
|
||||
#include "tensorflow/lite/experimental/tf_runtime/public/subgraph.h"
|
||||
#endif
|
||||
|
||||
namespace tflite {
|
||||
|
||||
namespace impl {
|
||||
@ -679,7 +683,11 @@ class Subgraph {
|
||||
|
||||
} // namespace impl
|
||||
|
||||
#if TFLITE_EXPERIMENTAL_RUNTIME_EAGER
|
||||
using Subgraph = tflrt::Subgraph;
|
||||
#else
|
||||
using Subgraph = impl::Subgraph;
|
||||
#endif
|
||||
|
||||
} // namespace tflite
|
||||
#endif // TENSORFLOW_LITE_CORE_SUBGRAPH_H_
|
||||
|
@ -34,6 +34,10 @@ limitations under the License.
|
||||
#include "tensorflow/lite/stderr_reporter.h"
|
||||
#include "tensorflow/lite/type_to_tflitetype.h"
|
||||
|
||||
#if TFLITE_EXPERIMENTAL_RUNTIME_EAGER
|
||||
#include "tensorflow/lite/experimental/tf_runtime/public/eager_interpreter.h"
|
||||
#endif
|
||||
|
||||
namespace tflite {
|
||||
|
||||
class InterpreterTest;
|
||||
@ -548,7 +552,11 @@ class Interpreter {
|
||||
|
||||
} // namespace impl
|
||||
|
||||
#if TFLITE_EXPERIMENTAL_RUNTIME_EAGER
|
||||
using Interpreter = tflrt::EagerInterpreter;
|
||||
#else
|
||||
using Interpreter = impl::Interpreter;
|
||||
#endif
|
||||
|
||||
} // namespace tflite
|
||||
#endif // TENSORFLOW_LITE_INTERPRETER_H_
|
||||
|
@ -19,12 +19,21 @@ limitations under the License.
|
||||
#ifndef TENSORFLOW_LITE_MODEL_H_
|
||||
#define TENSORFLOW_LITE_MODEL_H_
|
||||
|
||||
#include "tensorflow/lite/interpreter_builder.h"
|
||||
#include "tensorflow/lite/model_builder.h"
|
||||
|
||||
#if TFLITE_EXPERIMENTAL_RUNTIME_EAGER
|
||||
#include "tensorflow/lite/experimental/tf_runtime/lib/eager_model.h"
|
||||
#else
|
||||
#include "tensorflow/lite/interpreter_builder.h"
|
||||
#endif
|
||||
|
||||
namespace tflite {
|
||||
|
||||
#if TFLITE_EXPERIMENTAL_RUNTIME_EAGER
|
||||
using InterpreterBuilder = tflrt::EagerTfLiteInterpreterBuilderAPI;
|
||||
#else
|
||||
using InterpreterBuilder = impl::InterpreterBuilder;
|
||||
#endif
|
||||
|
||||
} // namespace tflite
|
||||
|
||||
|
@ -21,7 +21,6 @@ limitations under the License.
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "tensorflow/lite/allocation.h"
|
||||
#include "tensorflow/lite/c/builtin_op_data.h"
|
||||
#include "tensorflow/lite/c/common.h"
|
||||
#include "tensorflow/lite/core/api/error_reporter.h"
|
||||
|
@ -21,12 +21,13 @@ limitations under the License.
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "tensorflow/lite/allocation.h"
|
||||
#include "tensorflow/lite/c/common.h"
|
||||
#include "tensorflow/lite/core/api/error_reporter.h"
|
||||
#include "tensorflow/lite/core/api/op_resolver.h"
|
||||
#include "tensorflow/lite/interpreter.h"
|
||||
#include "tensorflow/lite/mutable_op_resolver.h"
|
||||
#include "tensorflow/lite/schema/schema_generated.h"
|
||||
#include "tensorflow/lite/stderr_reporter.h"
|
||||
|
||||
namespace tflite {
|
||||
|
||||
|
@ -19,6 +19,7 @@ limitations under the License.
|
||||
|
||||
#include "flatbuffers/flatbuffers.h" // from @flatbuffers
|
||||
#include "tensorflow/lite/core/api/op_resolver.h"
|
||||
#include "tensorflow/lite/interpreter.h"
|
||||
#include "tensorflow/lite/model.h"
|
||||
#include "tensorflow/lite/tools/optimize/calibration/calibration_reader.h"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user