ArmNN
 22.08
ExecuteNetworkParams.hpp
Go to the documentation of this file.
1 //
2 // Copyright © 2022 Arm Ltd and Contributors. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 
6 #pragma once
7 
8 #include <armnn/BackendId.hpp>
9 #include <armnn/Tensor.hpp>
10 
11 #if defined(ARMNN_TFLITE_DELEGATE)
12 #include <DelegateOptions.hpp>
13 #endif
14 
15 /// Holds all parameters necessary to execute a network
16 /// Check ExecuteNetworkProgramOptions.cpp for a description of each parameter
18 {
19  enum class TfLiteExecutor
20  {
24  };
25 
28  std::vector<armnn::BackendId> m_ComputeDevices;
31  std::string m_DynamicBackendsPath;
33  bool m_EnableFastMath = false;
35  bool m_EnableLayerDetails = false;
38  bool m_InferOutputShape = false;
39  bool m_EnableDelegate = false;
41  std::vector<std::string> m_InputNames;
42  std::vector<std::string> m_InputTensorDataFilePaths;
43  std::vector<armnn::TensorShape> m_InputTensorShapes;
44  size_t m_Iterations;
45  std::string m_ModelPath;
46  unsigned int m_NumberOfThreads;
49  std::vector<std::string> m_OutputNames;
50  std::vector<std::string> m_OutputTensorFiles;
51  bool m_ParseUnsupported = false;
56  size_t m_SubgraphId;
59  std::string m_TuningPath;
60  std::string m_MLGOTuningFilePath;
65  std::string m_ComparisonFile;
66  std::vector<armnn::BackendId> m_ComparisonComputeDevices;
68  // Ensures that the parameters for ExecuteNetwork fit together
69  void ValidateParams();
70 
71 #if defined(ARMNN_TFLITE_DELEGATE)
72  /// A utility method that populates a DelegateOptions object from this ExecuteNetworkParams.
73  armnnDelegate::DelegateOptions ToDelegateOptions() const;
74 #endif
75 
76 };
std::vector< armnn::TensorShape > m_InputTensorShapes
std::vector< std::string > m_OutputNames
std::vector< std::string > m_OutputTensorFiles
std::vector< armnn::BackendId > m_ComparisonComputeDevices
std::vector< armnn::BackendId > m_ComputeDevices
Holds all parameters necessary to execute a network Check ExecuteNetworkProgramOptions.cpp for a description of each parameter.
std::vector< std::string > m_InputNames
std::vector< std::string > m_InputTensorDataFilePaths