chromium/third_party/tflite/src/tensorflow/lite/acceleration/configuration/proto_to_flatbuffer.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/acceleration/configuration/proto_to_flatbuffer.h"

#include <cstdint>

#include "flatbuffers/buffer.h"  // from @flatbuffers
#include "flatbuffers/flatbuffers.h"  // from @flatbuffers
#include "tensorflow/lite/acceleration/configuration/configuration.pb.h"
#include "tensorflow/lite/acceleration/configuration/configuration_generated.h"
#include "tensorflow/lite/minimal_logging.h"

namespace tflite {

FlatBufferBuilder;
Offset;
String;
Vector;

ExecutionPreference ConvertExecutionPreference(
    proto::ExecutionPreference preference) {}

Delegate ConvertDelegate(proto::Delegate delegate) {}

NNAPIExecutionPreference ConvertNNAPIExecutionPreference(
    proto::NNAPIExecutionPreference preference) {}

NNAPIExecutionPriority ConvertNNAPIExecutionPriority(
    proto::NNAPIExecutionPriority priority) {}

GPUBackend ConvertGPUBackend(proto::GPUBackend backend) {}

GPUInferenceUsage ConvertGPUInferenceUsage(
    proto::GPUInferenceUsage preference) {}

GPUInferencePriority ConvertGPUInferencePriority(
    proto::GPUInferencePriority priority) {}

EdgeTpuPowerState ConvertEdgeTpuPowerState(proto::EdgeTpuPowerState state) {}

Offset<FallbackSettings> ConvertFallbackSettings(
    const proto::FallbackSettings& settings, FlatBufferBuilder& builder) {}

Offset<NNAPISettings> ConvertNNAPISettings(const proto::NNAPISettings& settings,
                                           FlatBufferBuilder& builder) {}

Offset<GPUSettings> ConvertGPUSettings(const proto::GPUSettings& settings,
                                       FlatBufferBuilder& builder) {}

Offset<HexagonSettings> ConvertHexagonSettings(
    const proto::HexagonSettings& settings, FlatBufferBuilder& builder) {}

Offset<XNNPackSettings> ConvertXNNPackSettings(
    const proto::XNNPackSettings& settings, FlatBufferBuilder& builder) {}

Offset<CoreMLSettings> ConvertCoreMLSettings(
    const proto::CoreMLSettings& settings, FlatBufferBuilder& builder) {}

Offset<StableDelegateLoaderSettings> ConvertStableDelegateLoaderSettings(
    const proto::StableDelegateLoaderSettings& settings,
    FlatBufferBuilder& builder) {}

Offset<CPUSettings> ConvertCPUSettings(const proto::CPUSettings& settings,
                                       FlatBufferBuilder& builder) {}

Offset<tflite::EdgeTpuDeviceSpec> ConvertEdgeTpuDeviceSpec(
    FlatBufferBuilder& builder, const proto::EdgeTpuDeviceSpec& device_spec) {}

Offset<GoogleEdgeTpuSettings> ConvertGoogleEdgeTpuSettings(
    const proto::GoogleEdgeTpuSettings& settings, FlatBufferBuilder& builder) {}

Offset<EdgeTpuSettings> ConvertEdgeTpuSettings(
    const proto::EdgeTpuSettings& settings, FlatBufferBuilder& builder) {}

Offset<CompilationCachingSettings> ConvertCompilationCachingSettings(
    const proto::CompilationCachingSettings& settings,
    FlatBufferBuilder& builder) {}

Offset<ArmNNSettings> ConvertArmNNSettings(const proto::ArmNNSettings& settings,
                                           FlatBufferBuilder& builder) {}

Offset<MtkNeuronSettings> ConvertMtkNeuronSettings(
    const proto::MtkNeuronSettings& settings, FlatBufferBuilder& builder) {}

Offset<CoralSettings> ConvertCoralSettings(const proto::CoralSettings& settings,
                                           FlatBufferBuilder& builder) {}

Offset<TFLiteSettings> ConvertTfliteSettings(
    const proto::TFLiteSettings& settings, FlatBufferBuilder& builder) {}

Offset<ModelFile> ConvertModelFile(const proto::ModelFile& model_file,
                                   FlatBufferBuilder& builder) {}

Offset<BenchmarkStoragePaths> ConvertBenchmarkStoragePaths(
    const proto::BenchmarkStoragePaths& storage_paths,
    FlatBufferBuilder& builder) {}

Offset<MinibenchmarkSettings> ConvertMinibenchmarkSettings(
    const proto::MinibenchmarkSettings& settings, FlatBufferBuilder& builder) {}

const TFLiteSettings* ConvertFromProto(
    const proto::TFLiteSettings& proto_settings, FlatBufferBuilder* builder) {}

const ComputeSettings* ConvertFromProto(
    const proto::ComputeSettings& proto_settings, FlatBufferBuilder* builder) {}

const MinibenchmarkSettings* ConvertFromProto(
    const proto::MinibenchmarkSettings& proto_settings,
    flatbuffers::FlatBufferBuilder* builder) {}

}  // namespace tflite