2 // Copyright © 2017 Arm Ltd. All rights reserved.
3 // See LICENSE file in the project root for full license information.
7 #include <armnn/DescriptorsFwd.hpp>
8 #include <armnn/Types.hpp>
9 #include <armnn/Tensor.hpp>
10 #include <armnn/ArmNN.hpp>
14 bool IsClDirectConvolution2dSupported(const TensorInfo& weightInfo, const Convolution2dDescriptor& desc);
15 bool IsClDepthwiseConvolution2dDescParamsSupported(std::string* reasonIfUnsupported,
16 const DepthwiseConvolution2dDescriptor& parameters,
17 const TensorInfo& weights);
19 bool IsActivationSupportedCl(const TensorInfo& input,
20 const TensorInfo& output,
21 const ActivationDescriptor& descriptor,
22 std::string* reasonIfUnsupported = nullptr);
24 bool IsAdditionSupportedCl(const TensorInfo& input0,
25 const TensorInfo& input1,
26 const TensorInfo& output,
27 std::string* reasonIfUnsupported = nullptr);
29 bool IsBatchNormalizationSupportedCl(const TensorInfo& input,
30 const TensorInfo& output,
31 const TensorInfo& mean,
32 const TensorInfo& var,
33 const TensorInfo& beta,
34 const TensorInfo& gamma,
35 const BatchNormalizationDescriptor& descriptor,
36 std::string* reasonIfUnsupported = nullptr);
38 bool IsConstantSupportedCl(const TensorInfo& output,
39 std::string* reasonIfUnsupported = nullptr);
41 bool IsConvolution2dSupportedCl(const TensorInfo& input,
42 const TensorInfo& output,
43 const Convolution2dDescriptor& descriptor,
44 const TensorInfo& weights,
45 const TensorInfo& biases,
46 std::string* reasonIfUnsupported = nullptr);
48 bool IsDepthwiseConvolutionSupportedCl(const TensorInfo& input,
49 const TensorInfo& output,
50 const DepthwiseConvolution2dDescriptor& descriptor,
51 const TensorInfo& weights,
52 const TensorInfo& biases,
53 std::string* reasonIfUnsupported = nullptr);
55 bool IsFullyConnectedSupportedCl(const TensorInfo& input,
56 const TensorInfo& output,
57 const TensorInfo& weights,
58 const TensorInfo& biases,
59 const FullyConnectedDescriptor& descriptor,
60 std::string* reasonIfUnsupported = nullptr);
62 bool IsInputSupportedCl(const TensorInfo& input,
63 std::string* reasonIfUnsupported = nullptr);
65 bool IsL2NormalizationSupportedCl(const TensorInfo& input,
66 const TensorInfo& output,
67 std::string* reasonIfUnsupported = nullptr);
69 bool IsLstmSupportedCl(const TensorInfo& input, const TensorInfo& outputStateIn,
70 const TensorInfo& cellStateIn, const TensorInfo& scratchBuffer,
71 const TensorInfo& outputStateOut, const TensorInfo& cellStateOut,
72 const TensorInfo& output, const LstmDescriptor& descriptor,
73 const TensorInfo& inputToForgetWeights, const TensorInfo& inputToCellWeights,
74 const TensorInfo& inputToOutputWeights, const TensorInfo& recurrentToForgetWeights,
75 const TensorInfo& recurrentToCellWeights, const TensorInfo& recurrentToOutputWeights,
76 const TensorInfo& forgetGateBias, const TensorInfo& cellBias,
77 const TensorInfo& outputGateBias, const TensorInfo* inputToInputWeights,
78 const TensorInfo* recurrentToInputWeights, const TensorInfo* cellToInputWeights,
79 const TensorInfo* inputGateBias, const TensorInfo* projectionWeights,
80 const TensorInfo* projectionBias, const TensorInfo* cellToForgetWeights,
81 const TensorInfo* cellToOutputWeights, std::string* reasonIfUnsupported = nullptr);
83 bool IsMergerSupportedCl(const std::vector<const TensorInfo*> inputs,
84 const OriginsDescriptor& descriptor,
85 std::string* reasonIfUnsupported = nullptr);
87 bool IsMultiplicationSupportedCl(const TensorInfo& input0,
88 const TensorInfo& input1,
89 const TensorInfo& output,
90 std::string* reasonIfUnsupported = nullptr);
92 bool IsNormalizationSupportedCl(const TensorInfo& input,
93 const TensorInfo& output,
94 const NormalizationDescriptor& descriptor,
95 std::string* reasonIfUnsupported = nullptr);
97 bool IsOutputSupportedCl(const TensorInfo& output,
98 std::string* reasonIfUnsupported = nullptr);
100 bool IsPermuteSupportedCl(const TensorInfo& input,
101 const TensorInfo& output,
102 const PermuteDescriptor& descriptor,
103 std::string* reasonIfUnsupported = nullptr);
105 bool IsPooling2dSupportedCl(const TensorInfo& input,
106 const TensorInfo& output,
107 const Pooling2dDescriptor& descriptor,
108 std::string* reasonIfUnsupported = nullptr);
110 bool IsResizeBilinearSupportedCl(const TensorInfo& input,
111 std::string* reasonIfUnsupported = nullptr);
113 bool IsSoftmaxSupportedCl(const TensorInfo& input,
114 const TensorInfo& output,
115 const SoftmaxDescriptor& descriptor,
116 std::string* reasonIfUnsupported = nullptr);
118 bool IsSplitterSupportedCl(const TensorInfo& input,
119 const ViewsDescriptor& descriptor,
120 std::string* reasonIfUnsupported = nullptr);
122 bool IsFakeQuantizationSupportedCl(const TensorInfo& input,
123 const FakeQuantizationDescriptor& descriptor,
124 std::string* reasonIfUnsupported = nullptr);
126 bool IsReshapeSupportedCl(const TensorInfo& input,
127 std::string* reasonIfUnsupported = nullptr);
129 bool IsFloorSupportedCl(const TensorInfo& input,
130 const TensorInfo& output,
131 std::string* reasonIfUnsupported = nullptr);
133 bool IsConvertFp16ToFp32SupportedCl(const TensorInfo& input,
134 const TensorInfo& output,
135 std::string* reasonIfUnsupported = nullptr);
137 bool IsConvertFp32ToFp16SupportedCl(const TensorInfo& input,
138 const TensorInfo& output,
139 std::string* reasonIfUnsupported = nullptr);