Skip to content

Commit 6627703

Browse files
IVGCVSW-7635 Remove deprecated code due to be removed in 23.08 (ILayerSupport)
* ILayerSupport interface - removed unstable virtual functions. * User instead uses IsLayerSupported accepting LayerType enum argument. * Backend developers should implement the ILayerSupport::IsLayerSupported method accepting LayerType as a switch statement with case being LayerType and each case calling their implementation of IsXXXSupported() Signed-off-by: Francis Murtagh <[email protected]> Change-Id: Iaaead8320bb1b2f1bdab6b5be2e1e69d0eb482d5
1 parent c229b3f commit 6627703

13 files changed

Lines changed: 206 additions & 3257 deletions

File tree

include/armnn/LayerSupport.hpp

Lines changed: 0 additions & 402 deletions
This file was deleted.

include/armnn/backends/ILayerSupport.hpp

Lines changed: 0 additions & 520 deletions
Large diffs are not rendered by default.

include/armnnTestUtils/MockBackend.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -331,21 +331,21 @@ class MockLayerSupport : public LayerSupportBase
331331
}
332332

333333
bool IsInputSupported(const TensorInfo& /*input*/,
334-
Optional<std::string&> /*reasonIfUnsupported = EmptyOptional()*/) const override
334+
Optional<std::string&> /*reasonIfUnsupported = EmptyOptional()*/) const
335335
{
336336
return true;
337337
}
338338

339339
bool IsOutputSupported(const TensorInfo& /*input*/,
340-
Optional<std::string&> /*reasonIfUnsupported = EmptyOptional()*/) const override
340+
Optional<std::string&> /*reasonIfUnsupported = EmptyOptional()*/) const
341341
{
342342
return true;
343343
}
344344

345345
bool IsAdditionSupported(const TensorInfo& /*input0*/,
346346
const TensorInfo& /*input1*/,
347347
const TensorInfo& /*output*/,
348-
Optional<std::string&> /*reasonIfUnsupported = EmptyOptional()*/) const override
348+
Optional<std::string&> /*reasonIfUnsupported = EmptyOptional()*/) const
349349
{
350350
return true;
351351
}
@@ -355,7 +355,7 @@ class MockLayerSupport : public LayerSupportBase
355355
const Convolution2dDescriptor& /*descriptor*/,
356356
const TensorInfo& /*weights*/,
357357
const Optional<TensorInfo>& /*biases*/,
358-
Optional<std::string&> /*reasonIfUnsupported = EmptyOptional()*/) const override
358+
Optional<std::string&> /*reasonIfUnsupported = EmptyOptional()*/) const
359359
{
360360
return true;
361361
}

include/armnnTestUtils/Version.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//
2-
// Copyright © 2022 Arm Ltd and Contributors. All rights reserved.
2+
// Copyright © 2022-2023 Arm Ltd and Contributors. All rights reserved.
33
// SPDX-License-Identifier: MIT
44
//
55

@@ -10,7 +10,7 @@
1010
#define STRINGIFY_MACRO(s) #s
1111

1212
// ArmnnTestUtils version components
13-
#define ARMNN_TEST_UTILS_MAJOR_VERSION 2
13+
#define ARMNN_TEST_UTILS_MAJOR_VERSION 3
1414
#define ARMNN_TEST_UTILS_MINOR_VERSION 0
1515
#define ARMNN_TEST_UTILS_PATCH_VERSION 0
1616

src/armnn/ILayerSupport.cpp

Lines changed: 7 additions & 1208 deletions
Large diffs are not rendered by default.

src/armnn/test/OptimizerTests.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,21 +166,21 @@ class MockLayerSupport : public LayerSupportBase
166166
}
167167

168168
bool IsInputSupported(const TensorInfo& /*input*/,
169-
Optional<std::string&> /*reasonIfUnsupported = EmptyOptional()*/) const override
169+
Optional<std::string&> /*reasonIfUnsupported = EmptyOptional()*/) const
170170
{
171171
return true;
172172
}
173173

174174
bool IsOutputSupported(const TensorInfo& /*input*/,
175-
Optional<std::string&> /*reasonIfUnsupported = EmptyOptional()*/) const override
175+
Optional<std::string&> /*reasonIfUnsupported = EmptyOptional()*/) const
176176
{
177177
return true;
178178
}
179179

180180
bool IsActivationSupported(const TensorInfo& /*input0*/,
181181
const TensorInfo& /*output*/,
182182
const ActivationDescriptor& /*descriptor*/,
183-
Optional<std::string&> /*reasonIfUnsupported = EmptyOptional()*/) const override
183+
Optional<std::string&> /*reasonIfUnsupported = EmptyOptional()*/) const
184184
{
185185
return true;
186186
}

src/armnnTfLiteParser/TfLiteParser.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
#include <armnn/utility/Assert.hpp>
1919
#include <armnn/utility/IgnoreUnused.hpp>
2020
#include <armnn/utility/NumericCast.hpp>
21-
#include <armnn/LayerSupport.hpp>
2221

2322
// armnnUtils:
2423
#include <armnnUtils/Permute.hpp>

src/backends/backendsCommon/LayerSupportBase.cpp

Lines changed: 0 additions & 524 deletions
Large diffs are not rendered by default.

src/backends/backendsCommon/LayerSupportBase.hpp

Lines changed: 7 additions & 410 deletions
Large diffs are not rendered by default.

src/backends/backendsCommon/test/mockBackend/MockImportLayerSupport.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class MockImportLayerSupport : public LayerSupportBase
4646
bool IsAdditionSupported(const TensorInfo& input0,
4747
const TensorInfo& input1,
4848
const TensorInfo& output,
49-
Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const override
49+
Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const
5050
{
5151
IgnoreUnused(input0);
5252
IgnoreUnused(input1);
@@ -56,15 +56,15 @@ class MockImportLayerSupport : public LayerSupportBase
5656
}
5757

5858
bool IsInputSupported(const TensorInfo& input,
59-
Optional<std::string&> reasonIfUnsupported) const override
59+
Optional<std::string&> reasonIfUnsupported) const
6060
{
6161
IgnoreUnused(input);
6262
IgnoreUnused(reasonIfUnsupported);
6363
return true;
6464
}
6565

6666
bool IsOutputSupported(const TensorInfo& output,
67-
Optional<std::string&> reasonIfUnsupported) const override
67+
Optional<std::string&> reasonIfUnsupported) const
6868
{
6969
IgnoreUnused(output);
7070
IgnoreUnused(reasonIfUnsupported);

0 commit comments

Comments
 (0)