21.05
|
Holds and parses program options for the ExecuteNetwork application. More...
#include <ExecuteNetworkProgramOptions.hpp>
Public Member Functions | |
ProgramOptions () | |
Initializes ProgramOptions by adding options to the underlying cxxopts::options object. More... | |
ProgramOptions (int ac, const char *av[]) | |
Runs ParseOptions() on initialization. More... | |
void | ParseOptions (int ac, const char *av[]) |
Parses program options from the command line or another source and stores the values in member variables. More... | |
void | ValidateExecuteNetworkParams () |
Ensures that the parameters for ExecuteNetwork fit together. More... | |
void | ValidateRuntimeOptions () |
Ensures that the runtime options are valid. More... | |
Public Attributes | |
cxxopts::Options | m_CxxOptions |
cxxopts::ParseResult | m_CxxResult |
ExecuteNetworkParams | m_ExNetParams |
armnn::IRuntime::CreationOptions | m_RuntimeOptions |
Holds and parses program options for the ExecuteNetwork application.
Definition at line 21 of file ExecuteNetworkProgramOptions.hpp.
ProgramOptions | ( | ) |
Initializes ProgramOptions by adding options to the underlying cxxopts::options object.
(Does not parse any options)
Definition at line 157 of file ExecuteNetworkProgramOptions.cpp.
References ARMNN_ASSERT_MSG, ARMNN_LOG, armnn::BackendRegistryInstance(), BackendRegistry::GetBackendIdsAsString(), ExecuteNetworkParams::m_CachedNetworkFilePath, IRuntime::CreationOptions::ExternalProfilingOptions::m_CapturePeriod, ExecuteNetworkParams::m_Concurrent, m_CxxOptions, ExecuteNetworkParams::m_DequantizeOutput, IRuntime::CreationOptions::m_DynamicBackendsPath, ExecuteNetworkParams::m_EnableBf16TurboMode, ExecuteNetworkParams::m_EnableDelegate, ExecuteNetworkParams::m_EnableFastMath, ExecuteNetworkParams::m_EnableFp16TurboMode, ExecuteNetworkParams::m_EnableLayerDetails, ExecuteNetworkParams::m_EnableProfiling, IRuntime::CreationOptions::ExternalProfilingOptions::m_EnableProfiling, m_ExNetParams, IRuntime::CreationOptions::ExternalProfilingOptions::m_FileFormat, IRuntime::CreationOptions::ExternalProfilingOptions::m_FileOnly, IRuntime::CreationOptions::ExternalProfilingOptions::m_IncomingCaptureFile, ExecuteNetworkParams::m_InferOutputShape, ExecuteNetworkParams::m_Iterations, ExecuteNetworkParams::m_MLGOTuningFilePath, ExecuteNetworkParams::m_ModelPath, ExecuteNetworkParams::m_NumberOfThreads, IRuntime::CreationOptions::ExternalProfilingOptions::m_OutgoingCaptureFile, ExecuteNetworkParams::m_ParseUnsupported, ExecuteNetworkParams::m_PrintIntermediate, IRuntime::CreationOptions::m_ProfilingOptions, ExecuteNetworkParams::m_QuantizeInput, m_RuntimeOptions, ExecuteNetworkParams::m_SaveCachedNetwork, ExecuteNetworkParams::m_SimultaneousIterations, ExecuteNetworkParams::m_SubgraphId, ExecuteNetworkParams::m_ThresholdTime, IRuntime::CreationOptions::ExternalProfilingOptions::m_TimelineEnabled, ExecuteNetworkParams::m_TuningLevel, and ExecuteNetworkParams::m_TuningPath.
ProgramOptions | ( | int | ac, |
const char * | av[] | ||
) |
Runs ParseOptions() on initialization.
Definition at line 387 of file ExecuteNetworkProgramOptions.cpp.
References ParseOptions().
void ParseOptions | ( | int | ac, |
const char * | av[] | ||
) |
Parses program options from the command line or another source and stores the values in member variables.
It also checks the validity of the parsed parameters. Throws a cxxopts exception if parsing fails or an armnn exception if parameters are not valid.
Definition at line 392 of file ExecuteNetworkProgramOptions.cpp.
References ARMNN_LOG, ExecuteNetworkParams::ArmNNTfLiteDelegate, ExecuteNetworkParams::ArmNNTfLiteParser, CheckOptionDependencies(), CheckRequiredOptions(), GetBackendIDs(), IRuntime::CreationOptions::m_BackendOptions, ExecuteNetworkParams::m_ComputeDevices, m_CxxOptions, m_CxxResult, ExecuteNetworkParams::m_DynamicBackendsPath, IRuntime::CreationOptions::m_DynamicBackendsPath, ExecuteNetworkParams::m_EnableDelegate, IRuntime::CreationOptions::m_EnableGpuProfiling, ExecuteNetworkParams::m_EnableProfiling, m_ExNetParams, ExecuteNetworkParams::m_GenerateTensorData, ExecuteNetworkParams::m_InputNames, ExecuteNetworkParams::m_InputTensorDataFilePaths, ExecuteNetworkParams::m_InputTensorShapes, ExecuteNetworkParams::m_InputTypes, ExecuteNetworkParams::m_MLGOTuningFilePath, ExecuteNetworkParams::m_ModelFormat, ExecuteNetworkParams::m_OutputNames, ExecuteNetworkParams::m_OutputTensorFiles, ExecuteNetworkParams::m_OutputTypes, m_RuntimeOptions, ExecuteNetworkParams::m_TfLiteExecutor, ExecuteNetworkParams::m_TuningLevel, ExecuteNetworkParams::m_TuningPath, ParseArray(), ParseStringList(), armnn::stringUtils::StringTrimCopy(), ExecuteNetworkParams::TfliteInterpreter, ValidateExecuteNetworkParams(), and ValidateRuntimeOptions().
Referenced by ProgramOptions().
void ValidateExecuteNetworkParams | ( | ) |
Ensures that the parameters for ExecuteNetwork fit together.
Definition at line 142 of file ExecuteNetworkProgramOptions.cpp.
References m_ExNetParams, and ExecuteNetworkParams::ValidateParams().
Referenced by ParseOptions().
void ValidateRuntimeOptions | ( | ) |
Ensures that the runtime options are valid.
Definition at line 147 of file ExecuteNetworkProgramOptions.cpp.
References LogAndThrowFatal(), IRuntime::CreationOptions::ExternalProfilingOptions::m_EnableProfiling, IRuntime::CreationOptions::m_ProfilingOptions, m_RuntimeOptions, and IRuntime::CreationOptions::ExternalProfilingOptions::m_TimelineEnabled.
Referenced by ParseOptions().
cxxopts::Options m_CxxOptions |
Definition at line 41 of file ExecuteNetworkProgramOptions.hpp.
Referenced by ParseOptions(), and ProgramOptions().
cxxopts::ParseResult m_CxxResult |
Definition at line 42 of file ExecuteNetworkProgramOptions.hpp.
Referenced by ParseOptions().
ExecuteNetworkParams m_ExNetParams |
Definition at line 44 of file ExecuteNetworkProgramOptions.hpp.
Referenced by main(), ParseOptions(), ProgramOptions(), and ValidateExecuteNetworkParams().
armnn::IRuntime::CreationOptions m_RuntimeOptions |
Definition at line 45 of file ExecuteNetworkProgramOptions.hpp.
Referenced by main(), ParseOptions(), ProgramOptions(), and ValidateRuntimeOptions().