diff options
author | Narumol Prangnawarat <narumol.prangnawarat@arm.com> | 2020-08-21 10:03:49 +0100 |
---|---|---|
committer | Teresa Charlin <teresa.charlinreyes@arm.com> | 2020-08-21 16:16:04 +0100 |
commit | 9214d81ad52a80e69618bea09870f1afff446d60 (patch) | |
tree | 8c5c038fd49abc4152cffa5e332a75c52c72d00a /include/armnn | |
parent | 186c21c9a598cbe2e81ad53e5b5fd96d75f981f5 (diff) | |
download | armnn-9214d81ad52a80e69618bea09870f1afff446d60.tar.gz |
IVGCVSW-5200 Add import enabled optimizer options to PyArmNN
Signed-off-by: Narumol Prangnawarat <narumol.prangnawarat@arm.com>
Change-Id: Ic7c288fd829d7f1f1ae2910c47fbccdd635def8f
Diffstat (limited to 'include/armnn')
-rw-r--r-- | include/armnn/INetwork.hpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/armnn/INetwork.hpp b/include/armnn/INetwork.hpp index 5e8a6f2476..1d4939e03d 100644 --- a/include/armnn/INetwork.hpp +++ b/include/armnn/INetwork.hpp @@ -616,6 +616,19 @@ struct OptimizerOptions , m_ImportEnabled(false) {} + OptimizerOptions(bool reduceFp32ToFp16, bool debug, bool reduceFp32ToBf16, bool importEnabled) + : m_ReduceFp32ToFp16(reduceFp32ToFp16) + , m_Debug(debug) + , m_ReduceFp32ToBf16(reduceFp32ToBf16) + , m_shapeInferenceMethod(armnn::ShapeInferenceMethod::ValidateOnly) + , m_ImportEnabled(importEnabled) + { + if (m_ReduceFp32ToFp16 && m_ReduceFp32ToBf16) + { + throw InvalidArgumentException("BFloat16 and Float16 optimization cannot be enabled at the same time."); + } + } + OptimizerOptions(bool reduceFp32ToFp16, bool debug, bool reduceFp32ToBf16 = false, ShapeInferenceMethod shapeInferenceMethod = armnn::ShapeInferenceMethod::ValidateOnly, bool importEnabled = false) |