diff options
author | narpra01 <narumol.prangnawarat@arm.com> | 2018-11-16 12:38:41 +0000 |
---|---|---|
committer | Aron Virginas-Tar <aron.virginas-tar@arm.com> | 2018-11-16 14:05:35 +0000 |
commit | fca75c39b1d375b7b3c8f08b6b160aa2e6f260bb (patch) | |
tree | 924ff5f8c49cb8282f7842cac816a869bcb8dd9b /src/backends/neon/NeonLayerSupport.cpp | |
parent | 81f2232a7e1145f80aaa2e382bb02c7653a058aa (diff) | |
download | armnn-fca75c39b1d375b7b3c8f08b6b160aa2e6f260bb.tar.gz |
IVGCVSW-2155 - Always call NEConvolutionLayer in NeonConvolution2dWorkload
* Remove check for preferDirectConvolution
* Remove IsNeonDirectConvolutionPreferred
* Remove unused tests and functions
Change-Id: I3f0868f41403ec5fa740889e7bdcb4415ad77bda
Diffstat (limited to 'src/backends/neon/NeonLayerSupport.cpp')
-rw-r--r-- | src/backends/neon/NeonLayerSupport.cpp | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/src/backends/neon/NeonLayerSupport.cpp b/src/backends/neon/NeonLayerSupport.cpp index 165e0677b7..28c4b75f2a 100644 --- a/src/backends/neon/NeonLayerSupport.cpp +++ b/src/backends/neon/NeonLayerSupport.cpp @@ -453,38 +453,4 @@ bool NeonLayerSupport::IsSubtractionSupported(const TensorInfo& input0, output); } -bool IsNeonDirectConvolutionPreferred(const TensorInfo& weightInfo, const Convolution2dDescriptor& desc) -{ - // See arm_compute::NEDirectConvolutionLayer documentation for the supported cases, - // and complement with NEDirectConvolutionLayerKernel::configure() implementation. - - // Only 1x1 is using direct convolution. Performance results and details are in: - // https://jira.arm.com/browse/IVGCVSW-1003 - // Measurements were taken as of clframework: f105ab972135bcd21304883eff040d7e587099bc - - const bool dataTypeSupported = (weightInfo.GetDataType() == armnn::DataType::Float32); - - // Strides: 1|2|3 - const bool strideSupported = (desc.m_StrideX == 1 || desc.m_StrideX == 2 || desc.m_StrideX == 3) && - (desc.m_StrideY == 1 || desc.m_StrideY == 2 || desc.m_StrideY == 3); - - auto paddingLargerThan = [](const Convolution2dDescriptor& conv2ddesc, unsigned int value) - { - return conv2ddesc.m_PadLeft > value || conv2ddesc.m_PadRight > value || - conv2ddesc.m_PadTop > value || conv2ddesc.m_PadBottom > value; - }; - - // Supported sizes and padding. - const bool sizeAndPaddingSupported = - // Pad > 0 not supported for 1x1 weights. - (weightInfo.GetShape()[2] == 1 && weightInfo.GetShape()[3] == 1 && !paddingLargerThan(desc, 0u)); - - const bool preferDirectConvolution = dataTypeSupported && - strideSupported && - sizeAndPaddingSupported && - // NEDirectConvolutionLayerKernel doesn't support NULL bias. - desc.m_BiasEnabled; - return preferDirectConvolution; -} - } // namespace armnn |