IVGCVSW-1929: Fix for this defect (QASYM8 no scale)
* Now hand in an optional vector of strings to Optimize
function in which errors/warning messages are placed.
* Optimize function changed to check outputs of each
layer. If they are Quantized 8 bit but the scale has
not been set an error message is added for each such output.
* Unit test modelled on defect report added to exercise the fix.
!android-nn-driver:152483
Change-Id: If9901f5324a516f1ab62858266b38f98dae16201
diff --git a/src/armnnUtils/ParserPrototxtFixture.hpp b/src/armnnUtils/ParserPrototxtFixture.hpp
index 89b823a..c502ad9 100644
--- a/src/armnnUtils/ParserPrototxtFixture.hpp
+++ b/src/armnnUtils/ParserPrototxtFixture.hpp
@@ -101,7 +101,8 @@
armnn::INetworkPtr network =
m_Parser->CreateNetworkFromString(m_Prototext.c_str(), inputShapes, requestedOutputs);
- auto optimized = Optimize(*network, { runtime.second, armnn::Compute::CpuRef }, runtime.first->GetDeviceSpec());
+ auto optimized = Optimize(*network,
+ { runtime.second, armnn::Compute::CpuRef }, runtime.first->GetDeviceSpec());
armnn::Status ret = runtime.first->LoadNetwork(m_NetworkIdentifier, move(optimized), errorMessage);
if (ret != armnn::Status::Success)
{
@@ -122,7 +123,8 @@
armnn::INetworkPtr network =
m_Parser->CreateNetworkFromString(m_Prototext.c_str());
- auto optimized = Optimize(*network, { runtime.second, armnn::Compute::CpuRef }, runtime.first->GetDeviceSpec());
+ auto optimized = Optimize(*network,
+ { runtime.second, armnn::Compute::CpuRef }, runtime.first->GetDeviceSpec());
armnn::Status ret = runtime.first->LoadNetwork(m_NetworkIdentifier, move(optimized), errorMessage);
if (ret != armnn::Status::Success)
{