diff options
-rw-r--r-- | 1.0/HalPolicy.cpp | 12 | ||||
-rw-r--r-- | 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 |