diff options
author | Mike Kelly <mike.kelly@arm.com> | 2022-11-25 13:55:24 +0000 |
---|---|---|
committer | mike.kelly <mike.kelly@arm.com> | 2022-12-12 15:58:21 +0000 |
commit | ec67a0f08e0f96a5aebf3cac65331c67f6649f5e (patch) | |
tree | 94146a1f43c74d89d83fd5da54688ae0fc19cf85 /src/backends/backendsCommon/test/IsLayerSupportedTestImpl.hpp | |
parent | 5383767a7a759c867235ab66bd71f88281e3bd06 (diff) | |
download | armnn-ec67a0f08e0f96a5aebf3cac65331c67f6649f5e.tar.gz |
IVGCVSW-7209 Remove deprecated code due to be removed in 23.02
* Removed weights and bias from Convolution, DepthwiseConv & FullyConnected
layers
* Removed the weight and bias ConstTensorHandles from the QueueDescriptors
* Updated Workloads to take tensors from WorkloadInfo rather than the
QueueDescriptors
* Removed unused RedirectMembersToConstantInputs optimization and tests.
Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com>
Signed-off-by: Mike Kelly <mike.kelly@arm.com>
Change-Id: I9ffcdc4a1c0dff725539dd69fc435b700bd98a56
Diffstat (limited to 'src/backends/backendsCommon/test/IsLayerSupportedTestImpl.hpp')
-rw-r--r-- | src/backends/backendsCommon/test/IsLayerSupportedTestImpl.hpp | 36 |
1 files changed, 21 insertions, 15 deletions
diff --git a/src/backends/backendsCommon/test/IsLayerSupportedTestImpl.hpp b/src/backends/backendsCommon/test/IsLayerSupportedTestImpl.hpp index 18f11a542e..fb7a0271d4 100644 --- a/src/backends/backendsCommon/test/IsLayerSupportedTestImpl.hpp +++ b/src/backends/backendsCommon/test/IsLayerSupportedTestImpl.hpp @@ -1,5 +1,5 @@ // -// Copyright © 2017 Arm Ltd and Contributors. All rights reserved. +// Copyright © 2017,2022 Arm Ltd and Contributors. All rights reserved. // SPDX-License-Identifier: MIT // #pragma once @@ -242,10 +242,6 @@ struct DummyConvolutionLayer desc.m_StrideX = 1; desc.m_StrideY = 1; m_Layer = dummyGraph.AddLayer<ConvolutionLayerType>(desc, ""); - m_Layer->m_Weight = std::make_unique<armnn::ScopedTensorHandle>( - armnn::TensorInfo(armnn::TensorShape({1,1,1,1}), armnn::DataType::Float32)); - m_Layer->m_Bias = std::make_unique<armnn::ScopedTensorHandle>( - armnn::TensorInfo(armnn::TensorShape({1,1,1,1}), armnn::DataType::Float32)); } ~DummyConvolutionLayer() @@ -268,10 +264,28 @@ struct DummyLayer<armnn::DepthwiseConvolution2dLayer> { }; -template<> +// Note: When m_Weight and m_Bias are removed from TransposeConvolution, Transpose can use DummyConvolutionLayer +template <> struct DummyLayer<armnn::TransposeConvolution2dLayer> - : public DummyConvolutionLayer<armnn::TransposeConvolution2dLayer> { + DummyLayer() + { + typename armnn::TransposeConvolution2dLayer::DescriptorType desc; + desc.m_StrideX = 1; + desc.m_StrideY = 1; + m_Layer = dummyGraph.AddLayer<armnn::TransposeConvolution2dLayer>(desc, ""); + m_Layer->m_Weight = std::make_unique<armnn::ScopedTensorHandle>( + armnn::TensorInfo(armnn::TensorShape({1,1,1,1}), armnn::DataType::Float32)); + m_Layer->m_Bias = std::make_unique<armnn::ScopedTensorHandle>( + armnn::TensorInfo(armnn::TensorShape({1,1,1,1}), armnn::DataType::Float32)); + } + + ~DummyLayer() + { + dummyGraph.EraseLayer(m_Layer); + } + + armnn::TransposeConvolution2dLayer* m_Layer; }; template<> @@ -518,8 +532,6 @@ struct DummyLayer<armnn::FullyConnectedLayer> { armnn::FullyConnectedLayer::DescriptorType desc; m_Layer = dummyGraph.AddLayer<armnn::FullyConnectedLayer>(desc, ""); - m_Layer->m_Weight = std::make_unique<armnn::ScopedTensorHandle>( - armnn::TensorInfo(armnn::TensorShape({1,1,1,1}), armnn::DataType::Float32)); } ~DummyLayer() @@ -767,12 +779,6 @@ unsigned int GetNumOutputs(const armnn::Layer& layer) return layer.GetNumOutputSlots(); } -template<> -unsigned int GetNumInputs<armnn::LayerType::Concat>(const armnn::Layer& layer) -{ - IgnoreUnused(layer); - return 2; -} // Tests that the IsLayerSupported() function returns the correct value. // We determined the correct value by *trying* to create the relevant workload and seeing if it matches what we expect. |