ArmNN
 22.02
ExecuteNetworkParams.hpp
Go to the documentation of this file.
1 //
2 // Copyright © 2020 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  using TensorShapePtr = std::unique_ptr<armnn::TensorShape>;
20 
21  enum class TfLiteExecutor
22  {
26  };
27 
29  std::vector<armnn::BackendId> m_ComputeDevices;
32  std::string m_DynamicBackendsPath;
34  bool m_EnableFastMath = false;
36  bool m_EnableLayerDetails = false;
39  bool m_InferOutputShape = false;
40  bool m_EnableDelegate = false;
41  std::vector<std::string> m_InputNames;
42  std::vector<std::string> m_InputTensorDataFilePaths;
43  std::vector<TensorShapePtr> m_InputTensorShapes;
44  std::vector<std::string> m_InputTypes;
46  size_t m_Iterations;
47  std::string m_ModelFormat;
48  std::string m_ModelPath;
49  unsigned int m_NumberOfThreads;
52  std::vector<std::string> m_OutputNames;
53  std::vector<std::string> m_OutputTensorFiles;
54  std::vector<std::string> m_OutputTypes;
55  bool m_ParseUnsupported = false;
61  size_t m_SubgraphId;
64  std::string m_TuningPath;
65  std::string m_MLGOTuningFilePath;
68 
69  // Ensures that the parameters for ExecuteNetwork fit together
70  void ValidateParams();
71 
72 #if defined(ARMNN_TFLITE_DELEGATE)
73  /// A utility method that populates a DelegateOptions object from this ExecuteNetworkParams.
74  armnnDelegate::DelegateOptions ToDelegateOptions() const;
75 #endif
76 
77 };
std::vector< std::string > m_InputTypes
std::unique_ptr< armnn::TensorShape > TensorShapePtr
std::vector< TensorShapePtr > m_InputTensorShapes
std::vector< std::string > m_OutputNames
std::vector< std::string > m_OutputTensorFiles
std::vector< armnn::BackendId > m_ComputeDevices
std::vector< std::string > m_OutputTypes
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