aboutsummaryrefslogtreecommitdiff
path: root/ArmnnDriverImpl.cpp
diff options
context:
space:
mode:
authorjimfly01 <jim.flynn@arm.com>2018-10-09 12:29:41 +0100
committerMatthew Bentham <matthew.bentham@arm.com>2018-10-12 11:59:53 +0100
commit07dedda93954646d9ed8bf3d468a89634f88f112 (patch)
tree2c44d598da80947eeaf5b3d3613c0cfbbaa7f2a3 /ArmnnDriverImpl.cpp
parent5602b1952c684514a13beb955123b0b46a58cde9 (diff)
downloadandroid-nn-driver-07dedda93954646d9ed8bf3d468a89634f88f112.tar.gz
IVGCVSW-1929: Optimize function signature change
* Optimize now returns reasons for failure !armnn:152481 Change-Id: I1cd7f5796b3c469e9baecbed80e392ac74e40ef4
Diffstat (limited to 'ArmnnDriverImpl.cpp')
-rw-r--r--ArmnnDriverImpl.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/ArmnnDriverImpl.cpp b/ArmnnDriverImpl.cpp
index 5d213659..267574c1 100644
--- a/ArmnnDriverImpl.cpp
+++ b/ArmnnDriverImpl.cpp
@@ -150,12 +150,14 @@ Return<ErrorStatus> ArmnnDriverImpl<HalPolicy>::prepareModel(
armnn::OptimizerOptions OptOptions;
OptOptions.m_ReduceFp32ToFp16 = float32ToFloat16;
+ std::vector<std::string> errMessages;
try
{
optNet = armnn::Optimize(*modelConverter.GetINetwork(),
{options.GetComputeDevice()},
runtime->GetDeviceSpec(),
- OptOptions);
+ OptOptions,
+ errMessages);
}
catch (armnn::Exception &e)
{
@@ -168,8 +170,13 @@ Return<ErrorStatus> ArmnnDriverImpl<HalPolicy>::prepareModel(
// Check that the optimized network is valid.
if (!optNet)
{
+ stringstream message;
+ message << "ArmnnDriverImpl::prepareModel: Invalid optimized network";
+ for (const string& msg : errMessages) {
+ message << "\n" << msg;
+ }
FailPrepareModel(ErrorStatus::GENERAL_FAILURE,
- "ArmnnDriverImpl::prepareModel: Invalid optimized network", cb);
+ message.str(), cb);
return ErrorStatus::NONE;
}