• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //
2 // Copyright © 2022-2023 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 
20 using namespace tflite;
21 class  TfLiteExecutor : public IExecutor
22 {
23 public:
24     TfLiteExecutor(const ExecuteNetworkParams& m_Params, armnn::IRuntime::CreationOptions runtimeOptions);
25 
26     std::vector<const void*> Execute() override;
PrintNetworkInfo()27     void PrintNetworkInfo() override{};
28     void CompareAndPrintResult(std::vector<const void*> otherOutput) override;
29 
30 private:
31     std::unique_ptr<tflite::FlatBufferModel> m_Model;
32     const ExecuteNetworkParams& m_Params;
33     std::unique_ptr<Interpreter> m_TfLiteInterpreter;
34 };
35 
36