blob: 623d6357eba120bfbed1042595527e8c8617b50f [file] [log] [blame]
Teresa Charlin83b42912022-07-07 14:24:59 +01001//
2// Copyright © 2022 Arm Ltd and Contributors. All rights reserved.
3// SPDX-License-Identifier: MIT
4//
5#pragma once
6
7#include "IExecutor.hpp"
8#include "NetworkExecutionUtils/NetworkExecutionUtils.hpp"
9#include "ExecuteNetworkProgramOptions.hpp"
10#include "armnn/utility/NumericCast.hpp"
11#include "armnn/utility/Timer.hpp"
12
13#include <armnn_delegate.hpp>
14#include <DelegateOptions.hpp>
15
16#include <tensorflow/lite/c/common.h>
17#include <tensorflow/lite/interpreter.h>
18#include <tensorflow/lite/kernels/register.h>
19
20using namespace tflite;
21class TfLiteExecutor : public IExecutor
22{
23public:
24 TfLiteExecutor(const ExecuteNetworkParams& m_Params);
25
26 std::vector<const void*> Execute() override;
27 void PrintNetworkInfo() override{};
28 void CompareAndPrintResult(std::vector<const void*> otherOutput) override;
29
30private:
31 std::unique_ptr<tflite::FlatBufferModel> m_Model;
32 const ExecuteNetworkParams& m_Params;
33 std::unique_ptr<Interpreter> m_TfLiteInterpreter;
34};
35