aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatteo Martincigh <matteo.martincigh@arm.com>2019-01-08 18:14:53 +0000
committerMatteo Martincigh <matteo.martincigh@arm.com>2019-01-11 10:07:32 +0000
commit265d1ad1c66eefc5c45025c314e2e2ac49a15949 (patch)
treeca19e7651e94ae29aad747f6a02ff5f648ebb293
parent2c444fc7725f06e337be8008b88895851b447c61 (diff)
downloadandroid-nn-driver-265d1ad1c66eefc5c45025c314e2e2ac49a15949.tar.gz
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
-rw-r--r--1.0/HalPolicy.cpp12
-rw-r--r--1.1/HalPolicy.cpp5
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