diff options
Diffstat (limited to '1.2')
-rw-r--r-- | 1.2/ArmnnDriverImpl.cpp | 10 | ||||
-rw-r--r-- | 1.2/HalPolicy.cpp | 6 |
2 files changed, 11 insertions, 5 deletions
diff --git a/1.2/ArmnnDriverImpl.cpp b/1.2/ArmnnDriverImpl.cpp index 8a444e5d..0d54c7ff 100644 --- a/1.2/ArmnnDriverImpl.cpp +++ b/1.2/ArmnnDriverImpl.cpp @@ -127,10 +127,10 @@ Return<ErrorStatus> ArmnnDriverImpl::prepareArmnnModel_1_2(const armnn::IRuntime OptOptions, errMessages); } - catch (armnn::Exception &e) + catch (std::exception& e) { std::stringstream message; - message << "armnn::Exception (" << e.what() << ") caught from optimize."; + message << "Exception (" << e.what() << ") caught from optimize."; FailPrepareModel(ErrorStatus::GENERAL_FAILURE, message.str(), cb); return ErrorStatus::NONE; } @@ -162,10 +162,10 @@ Return<ErrorStatus> ArmnnDriverImpl::prepareArmnnModel_1_2(const armnn::IRuntime return FailPrepareModel(ErrorStatus::GENERAL_FAILURE, "Network could not be loaded", cb); } } - catch (armnn::Exception& e) + catch (std::exception& e) { std::stringstream message; - message << "armnn::Exception (" << e.what()<< ") caught from LoadNetwork."; + message << "Exception (" << e.what() << ") caught from LoadNetwork."; FailPrepareModel(ErrorStatus::GENERAL_FAILURE, message.str(), cb); return ErrorStatus::NONE; } @@ -193,7 +193,7 @@ Return<ErrorStatus> ArmnnDriverImpl::prepareArmnnModel_1_2(const armnn::IRuntime { clTunedParameters->Save(options.GetClTunedParametersFile().c_str()); } - catch (const armnn::Exception& error) + catch (std::exception& error) { ALOGE("ArmnnDriverImpl::prepareModel: Failed to save CL tuned parameters file '%s': %s", options.GetClTunedParametersFile().c_str(), error.what()); diff --git a/1.2/HalPolicy.cpp b/1.2/HalPolicy.cpp index e08ae84f..0a12fd24 100644 --- a/1.2/HalPolicy.cpp +++ b/1.2/HalPolicy.cpp @@ -317,6 +317,12 @@ bool HalPolicy::ConvertDepthwiseConv2d(const Operation& operation, const Model& { return Fail("%s: Operand is invalid", __func__); } + if ( weightsOperand->dimensions[0] != 1) + { + return Fail("%s: Invalid weights; for depthwise convolution, dimension 0 must be 1 but it is %i", + __func__, weightsOperand->dimensions[0] ); + } + armnn::DepthwiseConvolution2dDescriptor desc; desc.m_DataLayout = armnn::DataLayout::NHWC; |