chromium/third_party/tflite_support/src/tensorflow_lite_support/cc/port/default/tflite_wrapper.cc

/* Copyright 2020 The TensorFlow Authors. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/

#include "tensorflow_lite_support/cc/port/default/tflite_wrapper.h"

#include "absl/status/status.h"  // from @com_google_absl
#include "absl/strings/str_format.h"  // from @com_google_absl
#include "tensorflow/lite/acceleration/configuration/flatbuffer_to_proto.h"
#include "tensorflow/lite/acceleration/configuration/proto_to_flatbuffer.h"
#include "tensorflow/lite/c/common.h"
#include "tensorflow/lite/delegates/interpreter_utils.h"
#include "tensorflow/lite/minimal_logging.h"
#include "tensorflow_lite_support/cc/port/status_macros.h"

namespace tflite {
namespace support {

namespace {
DelegatePluginRegistry;
InterpreterUtils;
ComputeSettings;
Delegate;
}  // namespace

/* static */
absl::Status TfLiteInterpreterWrapper::SanityCheckComputeSettings(
    const ComputeSettings& compute_settings) {}

TfLiteInterpreterWrapper::TfLiteInterpreterWrapper(
    const std::string& default_model_namespace,
    const std::string& default_model_id)
    :{}

std::string TfLiteInterpreterWrapper::ModelNamespace() {}

std::string TfLiteInterpreterWrapper::ModelID() {}

// This is the deprecated overload that doesn't take an
// InterpreterCreationResources parameter.
absl::Status TfLiteInterpreterWrapper::InitializeWithFallback(
    std::function<absl::Status(std::unique_ptr<tflite::Interpreter>*)>
        interpreter_initializer,
    const ComputeSettings& compute_settings) {}

absl::Status TfLiteInterpreterWrapper::InitializeWithFallback(
    std::function<absl::Status(const InterpreterCreationResources&,
                               std::unique_ptr<tflite::Interpreter>*)>
        interpreter_initializer,
    const ComputeSettings& compute_settings) {}

absl::Status TfLiteInterpreterWrapper::AllocateTensors() {}

// TODO(b/173406463): the `resize` parameter is going to be used by
// ResizeAndAllocateTensors functions, coming soon.
absl::Status TfLiteInterpreterWrapper::InitializeWithFallbackAndResize(
    std::function<absl::Status(Interpreter*)> resize) {}

absl::Status TfLiteInterpreterWrapper::InitializeDelegate() {}

absl::Status TfLiteInterpreterWrapper::InvokeWithFallback(
    const std::function<absl::Status(tflite::Interpreter* interpreter)>&
        set_inputs) {}

absl::Status TfLiteInterpreterWrapper::InvokeWithoutFallback() {}

void TfLiteInterpreterWrapper::Cancel() {}

void TfLiteInterpreterWrapper::SetTfLiteCancellation() {}

absl::Status TfLiteInterpreterWrapper::LoadDelegatePlugin(
    const std::string& name, const tflite::TFLiteSettings& tflite_settings) {}

bool TfLiteInterpreterWrapper::HasMiniBenchmarkCompleted() {}

}  // namespace support
}  // namespace tflite