aboutsummaryrefslogtreecommitdiff
path: root/src/armnn/ILayerSupport.cpp
blob: 9610ca1df91a04a987b73b430f7fffd618d7c86a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
//
// Copyright © 2022 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//

#include <armnn/Types.hpp>
#include <armnn/utility/PolymorphicDowncast.hpp>
#include <armnn/Tensor.hpp>
#include <armnn/backends/ILayerSupport.hpp>
#include <armnn/utility/IgnoreUnused.hpp>

namespace armnn
{

/// Default implementation of the ILayerSupport interface, Backends should implement this as a switch statement
/// for each of their LayerTypes calling their specific backend implementation of IsXXXLayerSupported.
bool ILayerSupport::IsLayerSupported(const LayerType& type,
                                     const std::vector<TensorInfo>& infos,
                                     const BaseDescriptor& descriptor,
                                     const Optional<LstmInputParamsInfo>& lstmParamsInfo,
                                     const Optional<QuantizedLstmInputParamsInfo>& quantizedLstmParamsInfo,
                                     Optional<std::string&> reasonIfUnsupported) const
{
    IgnoreUnused(infos);
    IgnoreUnused(descriptor);
    IgnoreUnused(lstmParamsInfo);
    IgnoreUnused(quantizedLstmParamsInfo);
    IgnoreUnused(reasonIfUnsupported);
    switch (type)
    {
        case LayerType::Map:
            return true;
        case LayerType::Unmap:
            return true;
        default:
            return false;
    }
}

}