chromium/third_party/tflite/src/tensorflow/lite/core/async/async_signature_runner.cc

/* Copyright 2022 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/core/async/async_signature_runner.h"

#include <map>
#include <memory>
#include <string>
#include <vector>

#include "tensorflow/lite/core/async/async_kernel_internal.h"
#include "tensorflow/lite/core/async/async_subgraph.h"
#include "tensorflow/lite/core/async/c/types.h"
#include "tensorflow/lite/core/async/task_internal.h"
#include "tensorflow/lite/core/c/c_api_types.h"
#include "tensorflow/lite/core/subgraph.h"

namespace tflite {
namespace async {

namespace {

// Returns the tensor index of the given signature name.
// `map` is a mapping from tensor signature name to tensor index.
// Return -1 if name is not found in the map or map is nullptr.
int GetIndex(const std::map<std::string, uint32_t>* map, const char* name) {}

}  // namespace

int AsyncSignatureRunner::GetTensorIndex(TfLiteIoType io_type,
                                         const char* name) const {}

AsyncSignatureRunner::AsyncSignatureRunner(
    const internal::SignatureDef* signature_def, Subgraph* subgraph)
    :{}

TfLiteStatus AsyncSignatureRunner::RegisterBuffer(
    TfLiteIoType io_type, const TfLiteBackendBuffer* buffer,
    const TfLiteAttributeMap* attrs, TfLiteBufferHandle* handle) {}

TfLiteStatus AsyncSignatureRunner::RegisterBufferSlice(
    TfLiteBufferHandle buffer_pool, const TfLiteAttributeMap* attrs,
    TfLiteBufferHandle* handle) {}

TfLiteStatus AsyncSignatureRunner::UnregisterBuffer(TfLiteBufferHandle handle) {}

const std::vector<const char*>& AsyncSignatureRunner::SupportedBufferTypes(
    TfLiteIoType io_type) const {}
const std::vector<const char*>& AsyncSignatureRunner::SupportedSynchronizations(
    TfLiteIoType io_type) const {}

bool AsyncSignatureRunner::ReconcileRestrictions(
    TfLiteIoType io_type, const char* name,
    const TfLiteAttributeMap* user_provided_attributes,
    TfLiteAttributeMap* merged, TfLiteAttributeMap* conflict) const {}

bool AsyncSignatureRunner::ReconcileRestrictions(
    int tensor_index, const TfLiteAttributeMap* user_provided_attributes,
    TfLiteAttributeMap* merged, TfLiteAttributeMap* conflict) const {}

TfLiteStatus AsyncSignatureRunner::SetAttributes(
    TfLiteIoType io_type, const char* name, const TfLiteAttributeMap* attrs) {}

TfLiteStatus AsyncSignatureRunner::SetAttributes(
    int tensor_index, const TfLiteAttributeMap* attrs) {}

TfLiteStatus AsyncSignatureRunner::SetBufferAttributes(
    const TfLiteBackendBuffer* buffer, const TfLiteAttributeMap* attrs) {}

TfLiteStatus AsyncSignatureRunner::GetBufferAttributes(
    const TfLiteBackendBuffer* buffer, TfLiteAttributeMap* attrs) {}

TfLiteStatus AsyncSignatureRunner::PrepareBackends() {}

TfLiteExecutionTask* AsyncSignatureRunner::CreateTask() {}

TfLiteStatus AsyncSignatureRunner::InvokeAsync(TfLiteExecutionTask* task) {}

TfLiteStatus AsyncSignatureRunner::Wait(TfLiteExecutionTask* task) {}

TfLiteStatus AsyncSignatureRunner::Finish(TfLiteExecutionTask* task) {}

const TfLiteOpaqueTensor* AsyncSignatureRunner::input_tensor(
    const char* input_name) const {}

const TfLiteOpaqueTensor* AsyncSignatureRunner::output_tensor(
    const char* output_name) const {}

}  // namespace async
}  // namespace tflite