23.02
|
ArmNN performs an optimization on each model/network before it gets loaded for execution. More...
#include <INetwork.hpp>
Public Member Functions | |
OptimizerOptions () | |
OptimizerOptions (bool reduceFp32ToFp16, bool debug, bool reduceFp32ToBf16, bool importEnabled, ModelOptions modelOptions={}, bool exportEnabled=false, bool debugToFile=false) | |
OptimizerOptions (bool reduceFp32ToFp16, bool debug, bool reduceFp32ToBf16=false, ShapeInferenceMethod shapeInferenceMethod=armnn::ShapeInferenceMethod::ValidateOnly, bool importEnabled=false, ModelOptions modelOptions={}, bool exportEnabled=false, bool debugToFile=false, bool allowExpandedDims=false) | |
const std::string | ToString () const |
Public Attributes | |
bool | m_ReduceFp32ToFp16 |
Reduces all Fp32 operators in the model to Fp16 for faster processing. More... | |
bool | m_Debug |
Add debug data for easier troubleshooting. More... | |
bool | m_DebugToFile |
Pass debug data to separate output files for easier troubleshooting. More... | |
bool | m_ReduceFp32ToBf16 |
@Note This feature has been replaced by enabling Fast Math in compute library backend options. More... | |
ShapeInferenceMethod | m_shapeInferenceMethod |
Infer output size when not available. More... | |
bool | m_ImportEnabled |
Enable Import. More... | |
ModelOptions | m_ModelOptions |
Enable Model Options. More... | |
bool | m_ProfilingEnabled |
Enable profiling dump of the optimizer phase. More... | |
bool | m_ExportEnabled |
Enable Export. More... | |
bool | m_AllowExpandedDims |
When calculating tensor sizes, dimensions of size == 1 will be ignored. More... | |
ArmNN performs an optimization on each model/network before it gets loaded for execution.
OptimizerOptions provides a set of features that allows the user to customize this optimization on a per model basis.
Definition at line 137 of file INetwork.hpp.
|
inline |
|
inline |
Definition at line 152 of file INetwork.hpp.
|
inline |
Definition at line 167 of file INetwork.hpp.
|
inline |
Definition at line 184 of file INetwork.hpp.
References BackendOptions::BackendOption::GetName(), BackendOptions::BackendOption::GetValue(), OptimizerOptions::m_AllowExpandedDims, OptimizerOptions::m_Debug, OptimizerOptions::m_DebugToFile, OptimizerOptions::m_ExportEnabled, OptimizerOptions::m_ImportEnabled, OptimizerOptions::m_ModelOptions, OptimizerOptions::m_ProfilingEnabled, OptimizerOptions::m_ReduceFp32ToBf16, OptimizerOptions::m_ReduceFp32ToFp16, OptimizerOptions::m_shapeInferenceMethod, BackendOptions::Var::ToString(), and armnn::ValidateOnly.
Referenced by armnn::Optimize().
bool m_AllowExpandedDims |
When calculating tensor sizes, dimensions of size == 1 will be ignored.
Definition at line 247 of file INetwork.hpp.
Referenced by OptimizerOptions::ToString().
bool m_Debug |
Add debug data for easier troubleshooting.
Definition at line 222 of file INetwork.hpp.
Referenced by armnn::Optimize(), and OptimizerOptions::ToString().
bool m_DebugToFile |
Pass debug data to separate output files for easier troubleshooting.
Definition at line 225 of file INetwork.hpp.
Referenced by armnn::Optimize(), and OptimizerOptions::ToString().
bool m_ExportEnabled |
Enable Export.
Definition at line 244 of file INetwork.hpp.
Referenced by armnn::Optimize(), and OptimizerOptions::ToString().
bool m_ImportEnabled |
Enable Import.
Definition at line 235 of file INetwork.hpp.
Referenced by armnn::Optimize(), and OptimizerOptions::ToString().
ModelOptions m_ModelOptions |
Enable Model Options.
Definition at line 238 of file INetwork.hpp.
Referenced by armnn::Optimize(), ArmnnDriverImpl::PrepareArmnnModel(), ArmnnDriverImpl::PrepareArmnnModelFromCache(), and OptimizerOptions::ToString().
bool m_ProfilingEnabled |
Enable profiling dump of the optimizer phase.
Definition at line 241 of file INetwork.hpp.
Referenced by armnn::Optimize(), ArmnnDriverImpl::PrepareArmnnModel(), ArmnnDriverImpl::PrepareArmnnModelFromCache(), and OptimizerOptions::ToString().
bool m_ReduceFp32ToBf16 |
@Note This feature has been replaced by enabling Fast Math in compute library backend options.
This is currently a placeholder option
Definition at line 229 of file INetwork.hpp.
Referenced by armnn::Optimize(), and OptimizerOptions::ToString().
bool m_ReduceFp32ToFp16 |
Reduces all Fp32 operators in the model to Fp16 for faster processing.
@Note This feature works best if all operators of the model are in Fp32. ArmNN will add conversion layers between layers that weren't in Fp32 in the first place or if the operator is not supported in Fp16. The overhead of these conversions can lead to a slower overall performance if too many conversions are required.
Definition at line 219 of file INetwork.hpp.
Referenced by armnn::Optimize(), ArmnnDriverImpl::PrepareArmnnModel(), ArmnnDriverImpl::PrepareArmnnModelFromCache(), and OptimizerOptions::ToString().
ShapeInferenceMethod m_shapeInferenceMethod |
Infer output size when not available.
Definition at line 232 of file INetwork.hpp.
Referenced by armnn::Optimize(), and OptimizerOptions::ToString().