diff options
author | Jan Eilers <jan.eilers@arm.com> | 2021-10-26 17:41:18 +0100 |
---|---|---|
committer | Jan Eilers <jan.eilers@arm.com> | 2021-12-08 16:04:18 +0000 |
commit | 6a71bb538dd67a38b321b5f2066784afd26e8c22 (patch) | |
tree | 8ea3adb3b54cf7eaaf31ba0aa2cf95e973bed27f /include/armnn/INetwork.hpp | |
parent | 6a056a4a584035ecd63fe1f70224175f3aca486e (diff) | |
download | armnn-6a71bb538dd67a38b321b5f2066784afd26e8c22.tar.gz |
Add ModelOptions logging output
Signed-off-by: Jan Eilers <jan.eilers@arm.com>
Change-Id: I1947924504c1308442b816cff513b2080ed3cc0d
Diffstat (limited to 'include/armnn/INetwork.hpp')
-rw-r--r-- | include/armnn/INetwork.hpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/include/armnn/INetwork.hpp b/include/armnn/INetwork.hpp index a4b37f37eb..6119f124e1 100644 --- a/include/armnn/INetwork.hpp +++ b/include/armnn/INetwork.hpp @@ -12,6 +12,7 @@ #include <armnn/NetworkFwd.hpp> #include <armnn/Optional.hpp> #include <armnn/TensorFwd.hpp> +#include <armnn/Logging.hpp> #include <memory> #include <vector> @@ -162,6 +163,32 @@ struct OptimizerOptions } } + const std::string ToString() const + { + std::stringstream stream; + stream << "OptimizerOptions: \n"; + stream << "\tReduceFp32ToFp16: " << m_ReduceFp32ToFp16 << "\n"; + stream << "\tReduceFp32ToBf16: " << m_ReduceFp32ToBf16 << "\n"; + stream << "\tDebug: " << + (m_shapeInferenceMethod == ShapeInferenceMethod::ValidateOnly ? "ValidateOnly" : "InferAndValidate") << "\n"; + stream << "\tImportEnabled: " << m_ImportEnabled << "\n"; + stream << "\tProfilingEnabled: " << m_ProfilingEnabled << "\n"; + + stream << "\tModelOptions: \n"; + for (auto optionsGroup : m_ModelOptions) + { + for (size_t i=0; i < optionsGroup.GetOptionCount(); i++) + { + const armnn::BackendOptions::BackendOption option = optionsGroup.GetOption(i); + stream << "\t\tBackend: " << optionsGroup.GetBackendId() + << "\t\t\tOption: " << option.GetName() + << "\t\t\tValue: " << std::string(option.GetValue().ToString()); + } + } + + return stream.str(); + } + /// 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. |