blob: cbd221f52b2136485ef6944b56cbb7dda39108fd [file] [log] [blame]
Narumol Prangnawarat867eba52020-02-03 12:29:56 +00001//
2// Copyright © 2020 Arm Ltd. All rights reserved.
3// SPDX-License-Identifier: MIT
4//
5
6#include "SampleDynamicLayerSupport.hpp"
7
8#include <InternalTypes.hpp>
9#include <LayerSupportCommon.hpp>
10#include <armnn/Types.hpp>
11
Jan Eilersc84e45d2020-08-19 14:14:36 +010012namespace sdb // sample dynamic backend
Narumol Prangnawarat867eba52020-02-03 12:29:56 +000013{
14
Jan Eilersc84e45d2020-08-19 14:14:36 +010015bool SampleDynamicLayerSupport::IsInputSupported(const armnn::TensorInfo& input,
16 armnn::Optional<std::string&> reasonIfUnsupported) const
Narumol Prangnawarat867eba52020-02-03 12:29:56 +000017{
18 return true;
19}
20
Jan Eilersc84e45d2020-08-19 14:14:36 +010021bool SampleDynamicLayerSupport::IsOutputSupported(const armnn::TensorInfo& output,
22 armnn::Optional<std::string&> reasonIfUnsupported) const
Narumol Prangnawarat867eba52020-02-03 12:29:56 +000023{
24 return true;
25}
26
Jan Eilersc84e45d2020-08-19 14:14:36 +010027bool SampleDynamicLayerSupport::IsAdditionSupported(const armnn::TensorInfo& input0,
28 const armnn::TensorInfo& input1,
29 const armnn::TensorInfo& output,
30 armnn::Optional<std::string&> reasonIfUnsupported) const
Narumol Prangnawarat867eba52020-02-03 12:29:56 +000031{
32
33 if (input0.GetDataType() != armnn::DataType::Float32)
34 {
35 return false;
36 }
37
38 if (input0.GetDataType() != input1.GetDataType())
39 {
40 return false;
41 }
42
43 if (input0.GetDataType() != output.GetDataType())
44 {
45 return false;
46 }
47
48 return true;
49}
50
Jan Eilersc84e45d2020-08-19 14:14:36 +010051} // namespace sdb