11 #include <fmt/format.h> 15 const std::string& tuningPath,
16 const std::vector<armnn::BackendId> computeDevices)
18 if (!tuningPath.empty())
22 ARMNN_LOG(info) <<
"Using cl tuning file: " << tuningPath <<
"\n";
28 else if ((1 <= tuningLevel) && (tuningLevel <= 3))
30 ARMNN_LOG(info) <<
"Starting execution to generate a cl tuning file: " << tuningPath <<
"\n" 31 <<
"Tuning level in use: " << tuningLevel <<
"\n";
33 else if ((0 < tuningLevel) || (tuningLevel > 3))
41 auto it = std::find(computeDevices.begin(), computeDevices.end(),
"GpuAcc");
42 if (it == computeDevices.end())
44 ARMNN_LOG(warning) <<
"To use Cl Tuning the compute device GpuAcc needs to be active.";
54 std::string invalidBackends;
57 ARMNN_LOG(fatal) <<
"The list of preferred devices contains invalid backend IDs: " 66 "enabled at the same time.");
74 "the same amount of elements. ");
87 fmt::format(
"According to the number of input names the user provided the network has {} " 88 "inputs. But only {} input-tensor-data file paths were provided. Each input of the " 89 "model is expected to be stored in it's own file.",
104 ARMNN_LOG(warning) <<
"No input files provided, input tensors will be filled with 0s.";
113 #if defined(ARMNN_TFLITE_DELEGATE) 160 {
"InferAndValidate",
true}
168 {
"AllowExpandedDims",
true}
174 return delegateOptions;
ModelOptions m_ModelOptions
std::string m_MLGOTuningFilePath
ShapeInferenceMethod m_shapeInferenceMethod
bool m_EnableFp16TurboMode
std::string m_DynamicBackendsPath
std::vector< armnn::TensorShape > m_InputTensorShapes
#define ARMNN_LOG(severity)
bool m_ReduceFp32ToBf16
Reduces all Fp32 operators in the model to Bf16 for faster processing.
void CheckClTuningParameter(const int &tuningLevel, const std::string &tuningPath, const std::vector< armnn::BackendId > computeDevices)
std::string m_CachedNetworkFilePath
std::vector< armnn::BackendId > m_ComputeDevices
bool m_ReduceFp32ToFp16
Reduces all Fp32 operators in the model to Fp16 for faster processing.
bool m_GenerateTensorData
unsigned int m_NumberOfThreads
bool CheckRequestedBackendsAreValid(const std::vector< armnn::BackendId > &backendIds, armnn::Optional< std::string &> invalidBackendIds=armnn::EmptyOptional())
std::vector< std::string > m_InputNames
Validate all output shapes.
bool ValidatePaths(const std::vector< std::string > &fileVec, const bool expectFile)
Verifies if a given vector of strings are valid paths.
ArmNN performs an optimization on each model/network before it gets loaded for execution.
bool m_EnableBf16TurboMode
std::vector< std::string > m_InputTensorDataFilePaths
Struct for the users to pass backend specific options.
void SetDynamicBackendsPath(const std::string &dynamicBackendsPath)
Infer missing output shapes and validate all output shapes.
void SetOptimizerOptions(const armnn::OptimizerOptions &optimizerOptions)
void SetGpuProfilingState(bool gpuProfilingState)
bool ValidatePath(const std::string &file, const bool expectFile)
Verifies if the given string is a valid path.
void SetInternalProfilingParams(bool internalProfilingState, const armnn::ProfilingDetailsMethod &internalProfilingDetail)