diff options
author | Kevin May <kevin.may@arm.com> | 2019-12-19 10:26:42 +0000 |
---|---|---|
committer | Kevin May <kevin.may@arm.com> | 2019-12-19 10:26:42 +0000 |
commit | 5dd88ab93e644c525a21ba820456e87cf3a6fb22 (patch) | |
tree | 21ba9ce60dffd4f9435e8803d7b72ca052ea5b94 | |
parent | c05798ca177d6a198d02425f6c57a35ec9ed6468 (diff) | |
download | android-nn-driver-5dd88ab93e644c525a21ba820456e87cf3a6fb22.tar.gz |
IVGCVSW-4303 Re-enable NCHW on Depthwise Convolution
* Also re-enable NCHW on BatchToSpace, SpaceToBatch and Transpose Conv
Signed-off-by: Kevin May <kevin.may@arm.com>
Change-Id: I386eb3d852978e7cc611efad4f9f0c982140865a
-rw-r--r-- | 1.2/HalPolicy.cpp | 10 | ||||
-rw-r--r-- | ConversionUtils.hpp | 10 |
2 files changed, 0 insertions, 20 deletions
diff --git a/1.2/HalPolicy.cpp b/1.2/HalPolicy.cpp index 5118ffb8..2665ea9a 100644 --- a/1.2/HalPolicy.cpp +++ b/1.2/HalPolicy.cpp @@ -339,11 +339,6 @@ bool HalPolicy::ConvertDepthwiseConv2d(const Operation& operation, const Model& const uint32_t dataLayoutFlagIndex = implicitPadding ? 8 : 11; desc.m_DataLayout = OptionalDataLayout<hal_1_2::HalPolicy>(operation, dataLayoutFlagIndex, model, data); - if (desc.m_DataLayout == armnn::DataLayout::NCHW) - { - return Fail("%s: Operation has invalid inputs NCHW is not supported", __func__); - } - armnnUtils::DataLayoutIndexed dataLayoutIndexed(desc.m_DataLayout); unsigned int channelsIndex = dataLayoutIndexed.GetChannelsIndex(); unsigned int widthIndex = dataLayoutIndexed.GetWidthIndex(); @@ -1828,11 +1823,6 @@ bool HalPolicy::ConvertTransposeConv2d(const Operation& operation, const Model& desc.m_DataLayout = OptionalDataLayout<hal_1_2::HalPolicy>(operation, 10, model, data); } - if (desc.m_DataLayout == armnn::DataLayout::NCHW) - { - return Fail("%s: Operation has invalid inputs NCHW is not supported", __func__); - } - armnnUtils::DataLayoutIndexed dataLayoutIndexed(desc.m_DataLayout); unsigned int widthIndex = dataLayoutIndexed.GetWidthIndex(); unsigned int heightIndex = dataLayoutIndexed.GetHeightIndex(); diff --git a/ConversionUtils.hpp b/ConversionUtils.hpp index 300c06f1..bbd2f07a 100644 --- a/ConversionUtils.hpp +++ b/ConversionUtils.hpp @@ -3215,11 +3215,6 @@ bool ConvertBatchToSpaceNd(const HalOperation& operation, if (Is12Operand(*output)) { batchToSpaceNdDesc.m_DataLayout = OptionalDataLayout<HalPolicy>(operation, 2, model, data); - - if (batchToSpaceNdDesc.m_DataLayout == armnn::DataLayout::NCHW) - { - return Fail("%s: Operation has invalid inputs NCHW is not supported", __func__); - } } // Setting crops to 0,0 0,0 as it is not supported in Android NN API batchToSpaceNdDesc.m_Crops = {{0, 0}, {0, 0}}; @@ -3322,11 +3317,6 @@ bool ConvertSpaceToBatchNd(const HalOperation& operation, const HalModel& model, if (Is12Operand(*output)) { descriptor.m_DataLayout = OptionalDataLayout<HalPolicy>(operation, 3, model, data); - - if (descriptor.m_DataLayout == armnn::DataLayout::NCHW) - { - return Fail("%s: Operation has invalid inputs NCHW is not supported", __func__); - } } bool isSupported = false; |