1 // 2 // Copyright © 2017 Arm Ltd. All rights reserved. 3 // SPDX-License-Identifier: MIT 4 // 5 #pragma once 6 7 #include <armnn/Deprecated.hpp> 8 #include <armnn/DescriptorsFwd.hpp> 9 #include <armnn/Optional.hpp> 10 #include <armnn/Tensor.hpp> 11 #include <armnn/Types.hpp> 12 #include "LstmParams.hpp" 13 #include "QuantizedLstmParams.hpp" 14 15 namespace armnn 16 { 17 18 /// Deprecated in favor of IBackend and ILayerSupport interfaces 19 bool IsActivationSupported(const BackendId& backend, 20 const TensorInfo& input, 21 const TensorInfo& output, 22 const ActivationDescriptor& descriptor, 23 char* reasonIfUnsupported = nullptr, 24 size_t reasonIfUnsupportedMaxLength = 1024); 25 26 /// Deprecated in favor of IBackend and ILayerSupport interfaces 27 bool IsAdditionSupported(const BackendId& backend, 28 const TensorInfo& input0, 29 const TensorInfo& input1, 30 const TensorInfo& output, 31 char* reasonIfUnsupported = nullptr, 32 size_t reasonIfUnsupportedMaxLength = 1024); 33 34 /// Deprecated in favor of IBackend and ILayerSupport interfaces 35 bool IsBatchNormalizationSupported(const BackendId& backend, 36 const TensorInfo& input, 37 const TensorInfo& output, 38 const TensorInfo& mean, 39 const TensorInfo& var, 40 const TensorInfo& beta, 41 const TensorInfo& gamma, 42 const BatchNormalizationDescriptor& descriptor, 43 char* reasonIfUnsupported = nullptr, 44 size_t reasonIfUnsupportedMaxLength = 1024); 45 46 /// Deprecated in favor of IBackend and ILayerSupport interfaces 47 bool IsBatchToSpaceNdSupported(const BackendId& backend, 48 const TensorInfo& input, 49 const TensorInfo& output, 50 const BatchToSpaceNdDescriptor& descriptor, 51 char* reasonIfUnsupported = nullptr, 52 size_t reasonIfUnsupportedMaxLength = 1024); 53 54 /// Deprecated in favor of IBackend and ILayerSupport interfaces 55 bool IsConcatSupported(const BackendId& backend, 56 const std::vector<const TensorInfo*> inputs, 57 const TensorInfo& output, 58 const OriginsDescriptor& descriptor, 59 char* reasonIfUnsupported = nullptr, 60 size_t reasonIfUnsupportedMaxLength = 1024); 61 62 /// Deprecated in favor of IBackend and ILayerSupport interfaces 63 bool IsConstantSupported(const BackendId& backend, 64 const TensorInfo& output, 65 char* reasonIfUnsupported = nullptr, 66 size_t reasonIfUnsupportedMaxLength = 1024); 67 68 /// Deprecated in favor of IBackend and ILayerSupport interfaces 69 bool IsConvertFp16ToFp32Supported(const BackendId& backend, 70 const TensorInfo& input, 71 const TensorInfo& output, 72 char* reasonIfUnsupported = nullptr, 73 size_t reasonIfUnsupportedMaxLength = 1024); 74 75 /// Deprecated in favor of IBackend and ILayerSupport interfaces 76 bool IsConvertFp32ToFp16Supported(const BackendId& backend, 77 const TensorInfo& input, 78 const TensorInfo& output, 79 char* reasonIfUnsupported = nullptr, 80 size_t reasonIfUnsupportedMaxLength = 1024); 81 82 /// Deprecated in favor of IBackend and ILayerSupport interfaces 83 bool IsConvolution2dSupported(const BackendId& backend, 84 const TensorInfo& input, 85 const TensorInfo& output, 86 const Convolution2dDescriptor& descriptor, 87 const TensorInfo& weights, 88 const Optional<TensorInfo>& biases, 89 char* reasonIfUnsupported = nullptr, 90 size_t reasonIfUnsupportedMaxLength = 1024); 91 92 /// Deprecated in favor of IBackend and ILayerSupport interfaces 93 bool IsDebugSupported(const BackendId& backend, 94 const TensorInfo& input, 95 const TensorInfo& output, 96 char* reasonIfUnsupported = nullptr, 97 size_t reasonIfUnsupportedMaxLength = 1024); 98 99 /// Deprecated in favor of IBackend and ILayerSupport interfaces 100 bool IsDepthwiseConvolutionSupported(const BackendId& backend, 101 const TensorInfo& input, 102 const TensorInfo& output, 103 const DepthwiseConvolution2dDescriptor& descriptor, 104 const TensorInfo& weights, 105 const Optional<TensorInfo>& biases, 106 char* reasonIfUnsupported = nullptr, 107 size_t reasonIfUnsupportedMaxLength = 1024); 108 109 /// Deprecated in favor of IBackend and ILayerSupport interfaces 110 bool IsDequantizeSupported(const BackendId& backend, 111 const TensorInfo& input, 112 const TensorInfo& output, 113 char* reasonIfUnsupported = nullptr, 114 size_t reasonIfUnsupportedMaxLength = 1024); 115 116 /// Deprecated in favor of IBackend and ILayerSupport interfaces 117 bool IsDivisionSupported(const BackendId& backend, 118 const TensorInfo& input0, 119 const TensorInfo& input1, 120 const TensorInfo& output, 121 char* reasonIfUnsupported = nullptr, 122 size_t reasonIfUnsupportedMaxLength = 1024); 123 124 /// Deprecated in favor of IBackend and ILayerSupport interfaces 125 bool IsEqualSupported(const BackendId& backend, 126 const TensorInfo& input0, 127 const TensorInfo& input1, 128 const TensorInfo& output, 129 char* reasonIfUnsupported = nullptr, 130 size_t reasonIfUnsupportedMaxLength = 1024); 131 132 /// Deprecated in favor of IBackend and ILayerSupport interfaces 133 bool IsFakeQuantizationSupported(const BackendId& backend, 134 const TensorInfo& input, 135 const FakeQuantizationDescriptor& descriptor, 136 char* reasonIfUnsupported = nullptr, 137 size_t reasonIfUnsupportedMaxLength = 1024); 138 139 /// Deprecated in favor of IBackend and ILayerSupport interfaces 140 bool IsFloorSupported(const BackendId& backend, 141 const TensorInfo& input, 142 const TensorInfo& output, 143 char* reasonIfUnsupported = nullptr, 144 size_t reasonIfUnsupportedMaxLength = 1024); 145 146 /// Deprecated in favor of IBackend and ILayerSupport interfaces 147 bool IsFullyConnectedSupported(const BackendId& backend, 148 const TensorInfo& input, 149 const TensorInfo& output, 150 const TensorInfo& weights, 151 const TensorInfo& biases, 152 const FullyConnectedDescriptor& descriptor, 153 char* reasonIfUnsupported = nullptr, 154 size_t reasonIfUnsupportedMaxLength = 1024); 155 156 /// Deprecated in favor of IBackend and ILayerSupport interfaces 157 bool IsGreaterSupported(const BackendId& backend, 158 const TensorInfo& input0, 159 const TensorInfo& input1, 160 const TensorInfo& output, 161 char* reasonIfUnsupported = nullptr, 162 size_t reasonIfUnsupportedMaxLength = 1024); 163 164 /// Deprecated in favor of IBackend and ILayerSupport interfaces 165 bool IsInputSupported(const BackendId& backend, 166 const TensorInfo& input, 167 char* reasonIfUnsupported = nullptr, 168 size_t reasonIfUnsupportedMaxLength = 1024); 169 170 /// Deprecated in favor of IBackend and ILayerSupport interfaces 171 bool IsL2NormalizationSupported(const BackendId& backend, 172 const TensorInfo& input, 173 const TensorInfo& output, 174 const L2NormalizationDescriptor& descriptor, 175 char* reasonIfUnsupported = nullptr, 176 size_t reasonIfUnsupportedMaxLength = 1024); 177 178 /// Deprecated in favor of IBackend and ILayerSupport interfaces 179 bool IsLstmSupported(const BackendId& backend, const TensorInfo& input, const TensorInfo& outputStateIn, 180 const TensorInfo& cellStateIn, const TensorInfo& scratchBuffer, 181 const TensorInfo& outputStateOut, const TensorInfo& cellStateOut, 182 const TensorInfo& output, const LstmDescriptor& descriptor, 183 const LstmInputParamsInfo& paramsInfo, char* reasonIfUnsupported = nullptr, 184 size_t reasonIfUnsupportedMaxLength = 1024); 185 186 /// Deprecated in favor of IBackend and ILayerSupport interfaces 187 bool IsMaximumSupported(const BackendId& backend, 188 const TensorInfo& input0, 189 const TensorInfo& input1, 190 const TensorInfo& output, 191 char* reasonIfUnSupported = nullptr, 192 size_t reasonIfUnSupportedMaxLength = 0); 193 194 /// Deprecated in favor of IBackend and ILayerSupport interfaces 195 bool IsMeanSupported(const BackendId& backend, 196 const TensorInfo& input, 197 const TensorInfo& output, 198 const MeanDescriptor& descriptor, 199 char* reasonIfUnsupported = nullptr, 200 size_t reasonIfUnsupportedMaxLength = 1024); 201 202 /// Deprecated in favor of IBackend and ILayerSupport interfaces 203 bool IsMemCopySupported(const BackendId& backend, 204 const TensorInfo& input, 205 const TensorInfo& output, 206 char* reasonIfUnsupported = nullptr, 207 size_t reasonIfUnsupportedMaxLength = 1024); 208 209 /// Deprecated in favor of IBackend and ILayerSupport interfaces 210 bool IsMergeSupported(const BackendId& backend, 211 const TensorInfo& input0, 212 const TensorInfo& input1, 213 const TensorInfo& output, 214 char* reasonIfUnsupported = nullptr, 215 size_t reasonIfUnsupportedMaxLength = 1024); 216 217 218 /// Deprecated in favor of IBackend and ILayerSupport interfaces 219 bool IsMinimumSupported(const BackendId& backend, 220 const TensorInfo& input0, 221 const TensorInfo& input1, 222 const TensorInfo& output, 223 char* reasonIfUnsupported = nullptr, 224 size_t reasonIfUnsupportedMaxLength = 1024); 225 226 /// Deprecated in favor of IBackend and ILayerSupport interfaces 227 bool IsMultiplicationSupported(const BackendId& backend, 228 const TensorInfo& input0, 229 const TensorInfo& input1, 230 const TensorInfo& output, 231 char* reasonIfUnsupported = nullptr, 232 size_t reasonIfUnsupportedMaxLength = 1024); 233 234 /// Deprecated in favor of IBackend and ILayerSupport interfaces 235 bool IsNormalizationSupported(const BackendId& backend, 236 const TensorInfo& input, 237 const TensorInfo& output, 238 const NormalizationDescriptor& descriptor, 239 char* reasonIfUnsupported = nullptr, 240 size_t reasonIfUnsupportedMaxLength = 1024); 241 242 /// Deprecated in favor of IBackend and ILayerSupport interfaces 243 bool IsOutputSupported(const BackendId& backend, 244 const TensorInfo& output, 245 char* reasonIfUnsupported = nullptr, 246 size_t reasonIfUnsupportedMaxLength = 1024); 247 248 /// Deprecated in favor of IBackend and ILayerSupport interfaces 249 bool IsPadSupported(const BackendId& backend, 250 const TensorInfo& input, 251 const TensorInfo& output, 252 const PadDescriptor& descriptor, 253 char* reasonIfUnsupported = nullptr, 254 size_t reasonIfUnsupportedMaxLength = 1024); 255 256 /// Deprecated in favor of IBackend and ILayerSupport interfaces 257 bool IsPermuteSupported(const BackendId& backend, 258 const TensorInfo& input, 259 const TensorInfo& output, 260 const PermuteDescriptor& descriptor, 261 char* reasonIfUnsupported = nullptr, 262 size_t reasonIfUnsupportedMaxLength = 1024); 263 264 /// Deprecated in favor of IBackend and ILayerSupport interfaces 265 bool IsPreCompiledSupported(const BackendId& backend, 266 const TensorInfo& input, 267 char* reasonIfUnsupported = nullptr, 268 size_t reasonIfUnsupportedMaxLength = 1024); 269 270 /// Deprecated in favor of IBackend and ILayerSupport interfaces 271 bool IsPreluSupported(const BackendId& backend, 272 const TensorInfo& input, 273 const TensorInfo& alpha, 274 const TensorInfo& output, 275 char* reasonIfUnsupported = nullptr, 276 size_t reasonIfUnsupportedMaxLength = 1024); 277 278 /// Deprecated in favor of IBackend and ILayerSupport interfaces 279 bool IsPooling2dSupported(const BackendId& backend, 280 const TensorInfo& input, 281 const TensorInfo& output, 282 const Pooling2dDescriptor& descriptor, 283 char* reasonIfUnsupported = nullptr, 284 size_t reasonIfUnsupportedMaxLength = 1024); 285 286 /// Deprecated in favor of IBackend and ILayerSupport interfaces 287 bool IsQuantizedLstmSupported(const BackendId& backend, 288 const TensorInfo& input, 289 const TensorInfo& previousCellStateIn, 290 const TensorInfo& previousOutputIn, 291 const TensorInfo& cellStateOut, 292 const TensorInfo& output, 293 const QuantizedLstmInputParamsInfo& paramsInfo, 294 char* reasonIfUnsupported = nullptr, 295 size_t reasonIfUnsupportedMaxLength = 1024); 296 297 /// Deprecated in favor of IBackend and ILayerSupport interfaces 298 bool IsReduceSupported(const BackendId& backend, 299 const TensorInfo& input, 300 const TensorInfo& output, 301 const ReduceDescriptor& descriptor, 302 char* reasonIfUnsupported = nullptr, 303 size_t reasonIfUnsupportedMaxLength = 1024); 304 305 /// Deprecated in favor of IBackend and ILayerSupport interfaces 306 bool IsReshapeSupported(const BackendId& backend, 307 const TensorInfo& input, 308 const ReshapeDescriptor& descriptor, 309 char* reasonIfUnsupported = nullptr, 310 size_t reasonIfUnsupportedMaxLength = 1024); 311 312 /// Deprecated in favor of IBackend and ILayerSupport interfaces 313 bool IsResizeSupported(const BackendId& backend, 314 const TensorInfo& input, 315 const TensorInfo& output, 316 const ResizeDescriptor& descriptor, 317 char* reasonIfUnsupported = nullptr, 318 size_t reasonIfUnsupportedMaxLength = 1024); 319 320 /// Deprecated in favor of IBackend and ILayerSupport interfaces 321 bool IsRsqrtSupported(const BackendId& backend, 322 const TensorInfo& input, 323 const TensorInfo& output, 324 char* reasonIfUnsupported = nullptr, 325 size_t reasonIfUnsupportedMaxLength = 1024); 326 327 /// Deprecated in favor of IBackend and ILayerSupport interfaces 328 bool IsSoftmaxSupported(const BackendId& backend, 329 const TensorInfo& input, 330 const TensorInfo& output, 331 const SoftmaxDescriptor& descriptor, 332 char* reasonIfUnsupported = nullptr, 333 size_t reasonIfUnsupportedMaxLength = 1024); 334 335 /// Deprecated in favor of IBackend and ILayerSupport interfaces 336 bool IsSpaceToBatchNdSupported(const BackendId& backend, 337 const TensorInfo& input, 338 const TensorInfo& output, 339 const SpaceToBatchNdDescriptor& descriptor, 340 char* reasonIfUnsupported = nullptr, 341 size_t reasonIfUnsupportedMaxLength = 1024); 342 343 /// Deprecated in favor of IBackend and ILayerSupport interfaces 344 bool IsSpaceToDepthSupported(const BackendId& backend, 345 const TensorInfo& input, 346 const TensorInfo& output, 347 const SpaceToDepthDescriptor& descriptor, 348 char* reasonIfUnsupported = nullptr, 349 size_t reasonIfUnsupportedMaxLength = 1024); 350 351 /// Deprecated in favor of IBackend and ILayerSupport interfaces 352 bool IsSplitterSupported(const BackendId& backend, 353 const TensorInfo& input, 354 const std::vector<std::reference_wrapper<TensorInfo>>& outputs, 355 const ViewsDescriptor& descriptor, 356 char* reasonIfUnsupported = nullptr, 357 size_t reasonIfUnsupportedMaxLength = 1024); 358 359 /// Deprecated in favor of IBackend and ILayerSupport interfaces 360 bool IsStackSupported(const BackendId& backend, 361 const std::vector<const TensorInfo*> inputs, 362 const TensorInfo& output, 363 const StackDescriptor& descriptor, 364 char* reasonIfUnsupported = nullptr, 365 size_t reasonIfUnsupportedMaxLength = 1024); 366 367 /// Deprecated in favor of IBackend and ILayerSupport interfaces 368 bool IsStridedSliceSupported(const BackendId& backend, 369 const TensorInfo& input, 370 const TensorInfo& output, 371 const StridedSliceDescriptor& descriptor, 372 char* reasonIfUnsupported = nullptr, 373 size_t reasonIfUnsupportedMaxLength = 1024); 374 375 /// Deprecated in favor of IBackend and ILayerSupport interfaces 376 bool IsSubtractionSupported(const BackendId& backend, 377 const TensorInfo& input0, 378 const TensorInfo& input1, 379 const TensorInfo& output, 380 char* reasonIfUnsupported = nullptr, 381 size_t reasonIfUnsupportedMaxLength = 1024); 382 383 /// Deprecated in favor of IBackend and ILayerSupport interfaces 384 bool IsSwitchSupported(const BackendId& backend, 385 const TensorInfo& input0, 386 const TensorInfo& input1, 387 const TensorInfo& output0, 388 const TensorInfo& output1, 389 char* reasonIfUnsupported = nullptr, 390 size_t reasonIfUnsupportedMaxLength = 1024); 391 392 /// Deprecated in favor of IBackend and ILayerSupport interfaces 393 bool IsTransposeConvolution2dSupported(const BackendId& backend, 394 const TensorInfo& input, 395 const TensorInfo& output, 396 const TransposeConvolution2dDescriptor& descriptor, 397 const TensorInfo& weights, 398 const Optional<TensorInfo>& biases, 399 char* reasonIfUnsupported = nullptr, 400 size_t reasonIfUnsupportedMaxLength = 1024); 401 402 } 403