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
diff --git a/1.0/HalPolicy.cpp b/1.0/HalPolicy.cpp
index d66f483..47c50c0 100644
--- a/1.0/HalPolicy.cpp
+++ b/1.0/HalPolicy.cpp
@@ -1299,19 +1299,19 @@
return Fail("%s: Could not read input 0", __func__);
}
- if (!IsLayerSupported(__func__,
- armnn::IsReshapeSupported,
- data.m_Compute,
- input.GetTensorInfo()))
- {
- return false;
- }
-
-
armnn::ReshapeDescriptor reshapeDescriptor;
reshapeDescriptor.m_TargetShape = armnn::TensorShape(requestedShape.dimensions.size(),
requestedShape.dimensions.data());
+ if (!IsLayerSupported(__func__,
+ armnn::IsReshapeSupported,
+ data.m_Compute,
+ input.GetTensorInfo(),
+ reshapeDescriptor))
+ {
+ return false;
+ }
+
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 91cce52..64b7d2a 100644
--- a/1.1/HalPolicy.cpp
+++ b/1.1/HalPolicy.cpp
@@ -431,7 +431,8 @@
if (!IsLayerSupported(__func__,
armnn::IsReshapeSupported,
data.m_Compute,
- inputInfo))
+ inputInfo,
+ reshapeDesc))
{
return false;
}
@@ -675,4 +676,4 @@
} // namespace hal_1_1
-} // namespace armnn_driver
\ No newline at end of file
+} // namespace armnn_driver