David Beck | e97c6e0 | 2018-10-03 13:09:28 +0100 | [diff] [blame] | 1 | // |
| 2 | // Copyright © 2017 Arm Ltd. All rights reserved. |
| 3 | // SPDX-License-Identifier: MIT |
| 4 | // |
| 5 | |
| 6 | #include <armnn/ILayerSupport.hpp> |
David Beck | 3cc9a62 | 2018-10-12 10:38:31 +0100 | [diff] [blame] | 7 | #include <armnn/Exceptions.hpp> |
David Beck | e97c6e0 | 2018-10-03 13:09:28 +0100 | [diff] [blame] | 8 | |
| 9 | namespace armnn |
| 10 | { |
| 11 | |
| 12 | namespace |
| 13 | { |
| 14 | |
| 15 | bool DefaultLayerSupport(const char* func, |
| 16 | const char* file, |
| 17 | unsigned int line, |
arovir01 | d6c10ed | 2018-10-05 15:46:51 +0100 | [diff] [blame] | 18 | Optional<std::string&> reasonIfUnsupported) |
David Beck | e97c6e0 | 2018-10-03 13:09:28 +0100 | [diff] [blame] | 19 | { |
arovir01 | d6c10ed | 2018-10-05 15:46:51 +0100 | [diff] [blame] | 20 | // NOTE: We only need to return the reason if the optional parameter is not empty |
| 21 | if (reasonIfUnsupported) |
David Beck | e97c6e0 | 2018-10-03 13:09:28 +0100 | [diff] [blame] | 22 | { |
arovir01 | d6c10ed | 2018-10-05 15:46:51 +0100 | [diff] [blame] | 23 | std::stringstream message; |
Nina Drozd | 7608927 | 2019-01-04 09:34:21 +0000 | [diff] [blame^] | 24 | message << func << " is not implemented [" << file << ":" << line << "]"; |
arovir01 | d6c10ed | 2018-10-05 15:46:51 +0100 | [diff] [blame] | 25 | |
| 26 | reasonIfUnsupported.value() = message.str(); |
David Beck | e97c6e0 | 2018-10-03 13:09:28 +0100 | [diff] [blame] | 27 | } |
arovir01 | d6c10ed | 2018-10-05 15:46:51 +0100 | [diff] [blame] | 28 | |
David Beck | e97c6e0 | 2018-10-03 13:09:28 +0100 | [diff] [blame] | 29 | return false; |
| 30 | } |
| 31 | |
arovir01 | 537a0b6 | 2018-10-08 12:01:04 +0100 | [diff] [blame] | 32 | } // anonymous namespace |
David Beck | e97c6e0 | 2018-10-03 13:09:28 +0100 | [diff] [blame] | 33 | |
| 34 | bool ILayerSupport::IsActivationSupported(const TensorInfo& input, |
| 35 | const TensorInfo& output, |
| 36 | const ActivationDescriptor& descriptor, |
arovir01 | d6c10ed | 2018-10-05 15:46:51 +0100 | [diff] [blame] | 37 | Optional<std::string&> reasonIfUnsupported) const |
David Beck | e97c6e0 | 2018-10-03 13:09:28 +0100 | [diff] [blame] | 38 | { |
arovir01 | d6c10ed | 2018-10-05 15:46:51 +0100 | [diff] [blame] | 39 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
David Beck | e97c6e0 | 2018-10-03 13:09:28 +0100 | [diff] [blame] | 40 | } |
| 41 | |
| 42 | bool ILayerSupport::IsAdditionSupported(const TensorInfo& input0, |
| 43 | const TensorInfo& input1, |
| 44 | const TensorInfo& output, |
arovir01 | d6c10ed | 2018-10-05 15:46:51 +0100 | [diff] [blame] | 45 | Optional<std::string&> reasonIfUnsupported) const |
David Beck | e97c6e0 | 2018-10-03 13:09:28 +0100 | [diff] [blame] | 46 | { |
arovir01 | d6c10ed | 2018-10-05 15:46:51 +0100 | [diff] [blame] | 47 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
David Beck | e97c6e0 | 2018-10-03 13:09:28 +0100 | [diff] [blame] | 48 | } |
| 49 | |
| 50 | bool ILayerSupport::IsBatchNormalizationSupported(const TensorInfo& input, |
| 51 | const TensorInfo& output, |
| 52 | const TensorInfo& mean, |
| 53 | const TensorInfo& var, |
| 54 | const TensorInfo& beta, |
| 55 | const TensorInfo& gamma, |
| 56 | const BatchNormalizationDescriptor& descriptor, |
arovir01 | d6c10ed | 2018-10-05 15:46:51 +0100 | [diff] [blame] | 57 | Optional<std::string&> reasonIfUnsupported) const |
David Beck | e97c6e0 | 2018-10-03 13:09:28 +0100 | [diff] [blame] | 58 | { |
arovir01 | d6c10ed | 2018-10-05 15:46:51 +0100 | [diff] [blame] | 59 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
David Beck | e97c6e0 | 2018-10-03 13:09:28 +0100 | [diff] [blame] | 60 | } |
| 61 | |
Éanna Ó Catháin | 4e1e136 | 2018-11-12 11:36:34 +0000 | [diff] [blame] | 62 | bool ILayerSupport::IsBatchToSpaceNdSupported(const TensorInfo& input, |
| 63 | const TensorInfo& output, |
| 64 | const BatchToSpaceNdDescriptor& descriptor, |
| 65 | Optional<std::string&> reasonIfUnsupported) const |
| 66 | { |
| 67 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 68 | } |
| 69 | |
David Beck | e97c6e0 | 2018-10-03 13:09:28 +0100 | [diff] [blame] | 70 | bool ILayerSupport::IsConstantSupported(const TensorInfo& output, |
arovir01 | d6c10ed | 2018-10-05 15:46:51 +0100 | [diff] [blame] | 71 | Optional<std::string&> reasonIfUnsupported) const |
David Beck | e97c6e0 | 2018-10-03 13:09:28 +0100 | [diff] [blame] | 72 | { |
arovir01 | d6c10ed | 2018-10-05 15:46:51 +0100 | [diff] [blame] | 73 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
David Beck | e97c6e0 | 2018-10-03 13:09:28 +0100 | [diff] [blame] | 74 | } |
| 75 | |
| 76 | bool ILayerSupport::IsConvertFp16ToFp32Supported(const TensorInfo& input, |
| 77 | const TensorInfo& output, |
arovir01 | d6c10ed | 2018-10-05 15:46:51 +0100 | [diff] [blame] | 78 | Optional<std::string&> reasonIfUnsupported) const |
David Beck | e97c6e0 | 2018-10-03 13:09:28 +0100 | [diff] [blame] | 79 | { |
arovir01 | d6c10ed | 2018-10-05 15:46:51 +0100 | [diff] [blame] | 80 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
David Beck | e97c6e0 | 2018-10-03 13:09:28 +0100 | [diff] [blame] | 81 | } |
| 82 | |
| 83 | bool ILayerSupport::IsConvertFp32ToFp16Supported(const TensorInfo& input, |
| 84 | const TensorInfo& output, |
arovir01 | d6c10ed | 2018-10-05 15:46:51 +0100 | [diff] [blame] | 85 | Optional<std::string&> reasonIfUnsupported) const |
David Beck | e97c6e0 | 2018-10-03 13:09:28 +0100 | [diff] [blame] | 86 | { |
arovir01 | d6c10ed | 2018-10-05 15:46:51 +0100 | [diff] [blame] | 87 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
David Beck | e97c6e0 | 2018-10-03 13:09:28 +0100 | [diff] [blame] | 88 | } |
| 89 | |
| 90 | bool ILayerSupport::IsConvolution2dSupported(const TensorInfo& input, |
| 91 | const TensorInfo& output, |
| 92 | const Convolution2dDescriptor& descriptor, |
| 93 | const TensorInfo& weights, |
David Beck | 5eec11d | 2018-10-04 15:43:17 +0100 | [diff] [blame] | 94 | const Optional<TensorInfo>& biases, |
arovir01 | d6c10ed | 2018-10-05 15:46:51 +0100 | [diff] [blame] | 95 | Optional<std::string&> reasonIfUnsupported) const |
David Beck | e97c6e0 | 2018-10-03 13:09:28 +0100 | [diff] [blame] | 96 | { |
arovir01 | d6c10ed | 2018-10-05 15:46:51 +0100 | [diff] [blame] | 97 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
David Beck | e97c6e0 | 2018-10-03 13:09:28 +0100 | [diff] [blame] | 98 | } |
| 99 | |
Nattapat Chaimanowong | a9a1cf1 | 2018-12-03 16:06:49 +0000 | [diff] [blame] | 100 | bool ILayerSupport::IsDebugSupported(const TensorInfo& input, |
| 101 | const TensorInfo& output, |
Nattapat Chaimanowong | ac5aa1f | 2018-12-05 15:17:18 +0000 | [diff] [blame] | 102 | const DebugDescriptor& descriptor, |
Nattapat Chaimanowong | a9a1cf1 | 2018-12-03 16:06:49 +0000 | [diff] [blame] | 103 | Optional<std::string&> reasonIfUnsupported) const |
| 104 | { |
| 105 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 106 | } |
| 107 | |
David Beck | e97c6e0 | 2018-10-03 13:09:28 +0100 | [diff] [blame] | 108 | bool ILayerSupport::IsDepthwiseConvolutionSupported(const TensorInfo& input, |
| 109 | const TensorInfo& output, |
| 110 | const DepthwiseConvolution2dDescriptor& descriptor, |
| 111 | const TensorInfo& weights, |
David Beck | 5eec11d | 2018-10-04 15:43:17 +0100 | [diff] [blame] | 112 | const Optional<TensorInfo>& biases, |
arovir01 | d6c10ed | 2018-10-05 15:46:51 +0100 | [diff] [blame] | 113 | Optional<std::string&> reasonIfUnsupported) const |
David Beck | e97c6e0 | 2018-10-03 13:09:28 +0100 | [diff] [blame] | 114 | { |
arovir01 | d6c10ed | 2018-10-05 15:46:51 +0100 | [diff] [blame] | 115 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
David Beck | e97c6e0 | 2018-10-03 13:09:28 +0100 | [diff] [blame] | 116 | } |
| 117 | |
| 118 | bool ILayerSupport::IsDivisionSupported(const TensorInfo& input0, |
| 119 | const TensorInfo& input1, |
| 120 | const TensorInfo& output, |
arovir01 | d6c10ed | 2018-10-05 15:46:51 +0100 | [diff] [blame] | 121 | Optional<std::string&> reasonIfUnsupported) const |
David Beck | e97c6e0 | 2018-10-03 13:09:28 +0100 | [diff] [blame] | 122 | { |
arovir01 | d6c10ed | 2018-10-05 15:46:51 +0100 | [diff] [blame] | 123 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
David Beck | e97c6e0 | 2018-10-03 13:09:28 +0100 | [diff] [blame] | 124 | } |
| 125 | |
FrancisMurtagh | 2099595 | 2018-12-17 12:11:36 +0000 | [diff] [blame] | 126 | bool ILayerSupport::IsEqualSupported(const armnn::TensorInfo& input0, |
| 127 | const armnn::TensorInfo& input1, |
| 128 | const armnn::TensorInfo& output, |
| 129 | armnn::Optional<std::string &> reasonIfUnsupported) const |
| 130 | { |
| 131 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 132 | } |
| 133 | |
arovir01 | 537a0b6 | 2018-10-08 12:01:04 +0100 | [diff] [blame] | 134 | bool ILayerSupport::IsFakeQuantizationSupported(const TensorInfo& input, |
| 135 | const FakeQuantizationDescriptor& descriptor, |
| 136 | Optional<std::string&> reasonIfUnsupported) const |
David Beck | e97c6e0 | 2018-10-03 13:09:28 +0100 | [diff] [blame] | 137 | { |
arovir01 | d6c10ed | 2018-10-05 15:46:51 +0100 | [diff] [blame] | 138 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
David Beck | e97c6e0 | 2018-10-03 13:09:28 +0100 | [diff] [blame] | 139 | } |
| 140 | |
arovir01 | 537a0b6 | 2018-10-08 12:01:04 +0100 | [diff] [blame] | 141 | bool ILayerSupport::IsFloorSupported(const TensorInfo& input, |
| 142 | const TensorInfo& output, |
arovir01 | d6c10ed | 2018-10-05 15:46:51 +0100 | [diff] [blame] | 143 | Optional<std::string&> reasonIfUnsupported) const |
David Beck | e97c6e0 | 2018-10-03 13:09:28 +0100 | [diff] [blame] | 144 | { |
arovir01 | d6c10ed | 2018-10-05 15:46:51 +0100 | [diff] [blame] | 145 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
David Beck | e97c6e0 | 2018-10-03 13:09:28 +0100 | [diff] [blame] | 146 | } |
| 147 | |
| 148 | bool ILayerSupport::IsFullyConnectedSupported(const TensorInfo& input, |
| 149 | const TensorInfo& output, |
| 150 | const TensorInfo& weights, |
| 151 | const TensorInfo& biases, |
| 152 | const FullyConnectedDescriptor& descriptor, |
arovir01 | d6c10ed | 2018-10-05 15:46:51 +0100 | [diff] [blame] | 153 | Optional<std::string&> reasonIfUnsupported) const |
David Beck | e97c6e0 | 2018-10-03 13:09:28 +0100 | [diff] [blame] | 154 | { |
arovir01 | d6c10ed | 2018-10-05 15:46:51 +0100 | [diff] [blame] | 155 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
David Beck | e97c6e0 | 2018-10-03 13:09:28 +0100 | [diff] [blame] | 156 | } |
| 157 | |
arovir01 | 537a0b6 | 2018-10-08 12:01:04 +0100 | [diff] [blame] | 158 | bool ILayerSupport::IsInputSupported(const TensorInfo& input, |
| 159 | Optional<std::string&> reasonIfUnsupported) const |
| 160 | { |
| 161 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 162 | } |
| 163 | |
David Beck | e97c6e0 | 2018-10-03 13:09:28 +0100 | [diff] [blame] | 164 | bool ILayerSupport::IsL2NormalizationSupported(const TensorInfo& input, |
| 165 | const TensorInfo& output, |
| 166 | const L2NormalizationDescriptor& descriptor, |
arovir01 | d6c10ed | 2018-10-05 15:46:51 +0100 | [diff] [blame] | 167 | Optional<std::string&> reasonIfUnsupported) const |
David Beck | e97c6e0 | 2018-10-03 13:09:28 +0100 | [diff] [blame] | 168 | { |
arovir01 | d6c10ed | 2018-10-05 15:46:51 +0100 | [diff] [blame] | 169 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
David Beck | e97c6e0 | 2018-10-03 13:09:28 +0100 | [diff] [blame] | 170 | } |
| 171 | |
| 172 | bool ILayerSupport::IsLstmSupported(const TensorInfo& input, |
| 173 | const TensorInfo& outputStateIn, |
| 174 | const TensorInfo& cellStateIn, |
| 175 | const TensorInfo& scratchBuffer, |
| 176 | const TensorInfo& outputStateOut, |
| 177 | const TensorInfo& cellStateOut, |
| 178 | const TensorInfo& output, |
| 179 | const LstmDescriptor& descriptor, |
| 180 | const TensorInfo& inputToForgetWeights, |
| 181 | const TensorInfo& inputToCellWeights, |
| 182 | const TensorInfo& inputToOutputWeights, |
| 183 | const TensorInfo& recurrentToForgetWeights, |
| 184 | const TensorInfo& recurrentToCellWeights, |
| 185 | const TensorInfo& recurrentToOutputWeights, |
| 186 | const TensorInfo& forgetGateBias, |
| 187 | const TensorInfo& cellBias, |
| 188 | const TensorInfo& outputGateBias, |
| 189 | const TensorInfo* inputToInputWeights, |
| 190 | const TensorInfo* recurrentToInputWeights, |
| 191 | const TensorInfo* cellToInputWeights, |
| 192 | const TensorInfo* inputGateBias, |
| 193 | const TensorInfo* projectionWeights, |
| 194 | const TensorInfo* projectionBias, |
| 195 | const TensorInfo* cellToForgetWeights, |
| 196 | const TensorInfo* cellToOutputWeights, |
arovir01 | d6c10ed | 2018-10-05 15:46:51 +0100 | [diff] [blame] | 197 | Optional<std::string&> reasonIfUnsupported) const |
David Beck | e97c6e0 | 2018-10-03 13:09:28 +0100 | [diff] [blame] | 198 | { |
arovir01 | d6c10ed | 2018-10-05 15:46:51 +0100 | [diff] [blame] | 199 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
David Beck | e97c6e0 | 2018-10-03 13:09:28 +0100 | [diff] [blame] | 200 | } |
| 201 | |
Nattapat Chaimanowong | 5a4304a | 2018-11-28 10:44:37 +0000 | [diff] [blame] | 202 | bool ILayerSupport::IsMaximumSupported(const TensorInfo& input0, |
| 203 | const TensorInfo& input1, |
| 204 | const TensorInfo& output, |
| 205 | Optional<std::string&> reasonIfUnsupported) const |
| 206 | { |
| 207 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 208 | } |
| 209 | |
arovir01 | 537a0b6 | 2018-10-08 12:01:04 +0100 | [diff] [blame] | 210 | bool ILayerSupport::IsMeanSupported(const TensorInfo& input, |
| 211 | const TensorInfo& output, |
| 212 | const MeanDescriptor& descriptor, |
| 213 | Optional<std::string&> reasonIfUnsupported) const |
| 214 | { |
| 215 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 216 | } |
| 217 | |
David Beck | e97c6e0 | 2018-10-03 13:09:28 +0100 | [diff] [blame] | 218 | bool ILayerSupport::IsMergerSupported(const std::vector<const TensorInfo*> inputs, |
Nikhil Raj | 8599a41 | 2018-11-19 14:51:07 +0000 | [diff] [blame] | 219 | const TensorInfo& output, |
David Beck | e97c6e0 | 2018-10-03 13:09:28 +0100 | [diff] [blame] | 220 | const OriginsDescriptor& descriptor, |
arovir01 | d6c10ed | 2018-10-05 15:46:51 +0100 | [diff] [blame] | 221 | Optional<std::string&> reasonIfUnsupported) const |
David Beck | e97c6e0 | 2018-10-03 13:09:28 +0100 | [diff] [blame] | 222 | { |
arovir01 | d6c10ed | 2018-10-05 15:46:51 +0100 | [diff] [blame] | 223 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
David Beck | e97c6e0 | 2018-10-03 13:09:28 +0100 | [diff] [blame] | 224 | } |
| 225 | |
kevmay01 | 9053969 | 2018-11-29 08:40:19 +0000 | [diff] [blame] | 226 | bool ILayerSupport::IsMinimumSupported(const TensorInfo& input0, |
| 227 | const TensorInfo& input1, |
| 228 | const TensorInfo& output, |
| 229 | Optional<std::string&> reasonIfUnsupported) const |
| 230 | { |
| 231 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 232 | } |
| 233 | |
David Beck | e97c6e0 | 2018-10-03 13:09:28 +0100 | [diff] [blame] | 234 | bool ILayerSupport::IsMultiplicationSupported(const TensorInfo& input0, |
| 235 | const TensorInfo& input1, |
| 236 | const TensorInfo& output, |
arovir01 | d6c10ed | 2018-10-05 15:46:51 +0100 | [diff] [blame] | 237 | Optional<std::string&> reasonIfUnsupported) const |
David Beck | e97c6e0 | 2018-10-03 13:09:28 +0100 | [diff] [blame] | 238 | { |
arovir01 | d6c10ed | 2018-10-05 15:46:51 +0100 | [diff] [blame] | 239 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
David Beck | e97c6e0 | 2018-10-03 13:09:28 +0100 | [diff] [blame] | 240 | } |
| 241 | |
| 242 | bool ILayerSupport::IsNormalizationSupported(const TensorInfo& input, |
| 243 | const TensorInfo& output, |
| 244 | const NormalizationDescriptor& descriptor, |
arovir01 | d6c10ed | 2018-10-05 15:46:51 +0100 | [diff] [blame] | 245 | Optional<std::string&> reasonIfUnsupported) const |
David Beck | e97c6e0 | 2018-10-03 13:09:28 +0100 | [diff] [blame] | 246 | { |
arovir01 | d6c10ed | 2018-10-05 15:46:51 +0100 | [diff] [blame] | 247 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
David Beck | e97c6e0 | 2018-10-03 13:09:28 +0100 | [diff] [blame] | 248 | } |
| 249 | |
| 250 | bool ILayerSupport::IsOutputSupported(const TensorInfo& output, |
arovir01 | d6c10ed | 2018-10-05 15:46:51 +0100 | [diff] [blame] | 251 | Optional<std::string&> reasonIfUnsupported) const |
David Beck | e97c6e0 | 2018-10-03 13:09:28 +0100 | [diff] [blame] | 252 | { |
arovir01 | d6c10ed | 2018-10-05 15:46:51 +0100 | [diff] [blame] | 253 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
David Beck | e97c6e0 | 2018-10-03 13:09:28 +0100 | [diff] [blame] | 254 | } |
| 255 | |
arovir01 | 537a0b6 | 2018-10-08 12:01:04 +0100 | [diff] [blame] | 256 | bool ILayerSupport::IsPadSupported(const TensorInfo& input, |
| 257 | const TensorInfo& output, |
| 258 | const PadDescriptor& descriptor, |
| 259 | Optional<std::string&> reasonIfUnsupported) const |
| 260 | { |
| 261 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 262 | } |
| 263 | |
David Beck | e97c6e0 | 2018-10-03 13:09:28 +0100 | [diff] [blame] | 264 | bool ILayerSupport::IsPermuteSupported(const TensorInfo& input, |
| 265 | const TensorInfo& output, |
| 266 | const PermuteDescriptor& descriptor, |
arovir01 | d6c10ed | 2018-10-05 15:46:51 +0100 | [diff] [blame] | 267 | Optional<std::string&> reasonIfUnsupported) const |
David Beck | e97c6e0 | 2018-10-03 13:09:28 +0100 | [diff] [blame] | 268 | { |
arovir01 | d6c10ed | 2018-10-05 15:46:51 +0100 | [diff] [blame] | 269 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
David Beck | e97c6e0 | 2018-10-03 13:09:28 +0100 | [diff] [blame] | 270 | } |
| 271 | |
| 272 | bool ILayerSupport::IsPooling2dSupported(const TensorInfo& input, |
| 273 | const TensorInfo& output, |
| 274 | const Pooling2dDescriptor& descriptor, |
arovir01 | d6c10ed | 2018-10-05 15:46:51 +0100 | [diff] [blame] | 275 | Optional<std::string&> reasonIfUnsupported) const |
David Beck | e97c6e0 | 2018-10-03 13:09:28 +0100 | [diff] [blame] | 276 | { |
arovir01 | d6c10ed | 2018-10-05 15:46:51 +0100 | [diff] [blame] | 277 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
David Beck | e97c6e0 | 2018-10-03 13:09:28 +0100 | [diff] [blame] | 278 | } |
| 279 | |
arovir01 | 537a0b6 | 2018-10-08 12:01:04 +0100 | [diff] [blame] | 280 | bool ILayerSupport::IsReshapeSupported(const TensorInfo& input, |
| 281 | Optional<std::string&> reasonIfUnsupported) const |
| 282 | { |
| 283 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 284 | } |
| 285 | |
David Beck | e97c6e0 | 2018-10-03 13:09:28 +0100 | [diff] [blame] | 286 | bool ILayerSupport::IsResizeBilinearSupported(const TensorInfo& input, |
arovir01 | d6c10ed | 2018-10-05 15:46:51 +0100 | [diff] [blame] | 287 | Optional<std::string&> reasonIfUnsupported) const |
David Beck | e97c6e0 | 2018-10-03 13:09:28 +0100 | [diff] [blame] | 288 | { |
arovir01 | d6c10ed | 2018-10-05 15:46:51 +0100 | [diff] [blame] | 289 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
David Beck | e97c6e0 | 2018-10-03 13:09:28 +0100 | [diff] [blame] | 290 | } |
| 291 | |
| 292 | bool ILayerSupport::IsSoftmaxSupported(const TensorInfo& input, |
| 293 | const TensorInfo& output, |
| 294 | const SoftmaxDescriptor& descriptor, |
arovir01 | d6c10ed | 2018-10-05 15:46:51 +0100 | [diff] [blame] | 295 | Optional<std::string&> reasonIfUnsupported) const |
David Beck | e97c6e0 | 2018-10-03 13:09:28 +0100 | [diff] [blame] | 296 | { |
arovir01 | d6c10ed | 2018-10-05 15:46:51 +0100 | [diff] [blame] | 297 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
David Beck | e97c6e0 | 2018-10-03 13:09:28 +0100 | [diff] [blame] | 298 | } |
| 299 | |
Nattapat Chaimanowong | 207ef9a | 2018-11-02 10:57:25 +0000 | [diff] [blame] | 300 | bool ILayerSupport::IsSpaceToBatchNdSupported(const TensorInfo& input, |
| 301 | const TensorInfo& output, |
| 302 | const SpaceToBatchNdDescriptor& descriptor, |
| 303 | Optional<std::string&> reasonIfUnsupported) const |
| 304 | { |
| 305 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 306 | } |
| 307 | |
David Beck | e97c6e0 | 2018-10-03 13:09:28 +0100 | [diff] [blame] | 308 | bool ILayerSupport::IsSplitterSupported(const TensorInfo& input, |
| 309 | const ViewsDescriptor& descriptor, |
arovir01 | d6c10ed | 2018-10-05 15:46:51 +0100 | [diff] [blame] | 310 | Optional<std::string&> reasonIfUnsupported) const |
David Beck | e97c6e0 | 2018-10-03 13:09:28 +0100 | [diff] [blame] | 311 | { |
arovir01 | d6c10ed | 2018-10-05 15:46:51 +0100 | [diff] [blame] | 312 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
David Beck | e97c6e0 | 2018-10-03 13:09:28 +0100 | [diff] [blame] | 313 | } |
| 314 | |
Conor Kennedy | 430b5d8 | 2018-11-14 15:28:28 +0000 | [diff] [blame] | 315 | bool ILayerSupport::IsStridedSliceSupported(const TensorInfo& input, |
| 316 | const TensorInfo& output, |
| 317 | const StridedSliceDescriptor& descriptor, |
| 318 | Optional<std::string&> reasonIfUnsupported) const |
| 319 | { |
| 320 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 321 | } |
| 322 | |
arovir01 | 537a0b6 | 2018-10-08 12:01:04 +0100 | [diff] [blame] | 323 | bool ILayerSupport::IsSubtractionSupported(const TensorInfo& input0, |
| 324 | const TensorInfo& input1, |
| 325 | const TensorInfo& output, |
| 326 | Optional<std::string&> reasonIfUnsupported) const |
David Beck | e97c6e0 | 2018-10-03 13:09:28 +0100 | [diff] [blame] | 327 | { |
arovir01 | d6c10ed | 2018-10-05 15:46:51 +0100 | [diff] [blame] | 328 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
David Beck | e97c6e0 | 2018-10-03 13:09:28 +0100 | [diff] [blame] | 329 | } |
| 330 | |
Matteo Martincigh | 59a950c | 2018-12-13 12:48:25 +0000 | [diff] [blame] | 331 | bool ILayerSupport::IsGreaterSupported(const TensorInfo& input0, |
| 332 | const TensorInfo& input1, |
| 333 | const TensorInfo& output, |
| 334 | Optional<std::string&> reasonIfUnsupported) const |
| 335 | { |
| 336 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 337 | } |
| 338 | |
arovir01 | 537a0b6 | 2018-10-08 12:01:04 +0100 | [diff] [blame] | 339 | } // namespace armnn |