From 265d1ad1c66eefc5c45025c314e2e2ac49a15949 Mon Sep 17 00:00:00 2001 From: Matteo Martincigh Date: Tue, 8 Jan 2019 18:14:53 +0000 Subject: IVGCVSW-2454 Merge together the pluggable backends work (was in a separate branch) and master * Minor fixes to make the NN Driver build with the merged changes * Passed missing ReshapeDescriptor to the layer support function !armnn:491 Change-Id: I61fb6ed8df6895bd5a12c6f2b1c322929eebe176 --- 1.0/HalPolicy.cpp | 12 ++++++------ 1.1/HalPolicy.cpp | 5 +++-- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/1.0/HalPolicy.cpp b/1.0/HalPolicy.cpp index d66f483d..47c50c02 100644 --- a/1.0/HalPolicy.cpp +++ b/1.0/HalPolicy.cpp @@ -1299,19 +1299,19 @@ bool HalPolicy::ConvertReshape(const Operation& operation, const Model& model, C return Fail("%s: Could not read input 0", __func__); } + armnn::ReshapeDescriptor reshapeDescriptor; + reshapeDescriptor.m_TargetShape = armnn::TensorShape(requestedShape.dimensions.size(), + requestedShape.dimensions.data()); + if (!IsLayerSupported(__func__, armnn::IsReshapeSupported, data.m_Compute, - input.GetTensorInfo())) + input.GetTensorInfo(), + reshapeDescriptor)) { return false; } - - armnn::ReshapeDescriptor reshapeDescriptor; - reshapeDescriptor.m_TargetShape = armnn::TensorShape(requestedShape.dimensions.size(), - requestedShape.dimensions.data()); - armnn::IConnectableLayer* layer = data.m_Network->AddReshapeLayer(reshapeDescriptor); assert(layer != nullptr); input.Connect(layer->GetInputSlot(0)); diff --git a/1.1/HalPolicy.cpp b/1.1/HalPolicy.cpp index 91cce526..64b7d2ae 100644 --- a/1.1/HalPolicy.cpp +++ b/1.1/HalPolicy.cpp @@ -431,7 +431,8 @@ bool HalPolicy::ConvertSqueeze(const Operation& operation, const Model& model, C if (!IsLayerSupported(__func__, armnn::IsReshapeSupported, data.m_Compute, - inputInfo)) + inputInfo, + reshapeDesc)) { return false; } @@ -675,4 +676,4 @@ bool HalPolicy::ConvertBatchToSpaceNd(const Operation& operation, const Model& m } // namespace hal_1_1 -} // namespace armnn_driver \ No newline at end of file +} // namespace armnn_driver -- cgit v1.2.1