2 * Copyright (c) 2020 Samsung Electronics Co., Ltd. All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 #ifndef LUCI_INTERPRETER_CORE_KERNELPARAMS_H
18 #define LUCI_INTERPRETER_CORE_KERNELPARAMS_H
20 #include <luci/IR/AttrPadding.h>
21 #include <luci/IR/AttrFusedActFunc.h>
22 #include <luci/IR/AttrMirrorPadMode.h>
23 #include <luci_interpreter/core/DataType.h>
28 namespace luci_interpreter
31 // Inject commonly used types into `luci_interpreter` namespace for convenience.
32 using Activation = luci::FusedActFunc;
33 using Padding = luci::Padding;
34 using MirrorPadMode = luci::MirrorPadMode;
38 Activation activation;
46 struct BatchMatMulParams
52 struct ConcatenationParams
55 Activation activation;
61 int32_t stride_height;
63 int32_t dilation_height_factor;
64 int32_t dilation_width_factor;
65 Activation activation;
68 struct DepthToSpaceParams
73 struct DepthwiseConv2DParams
76 int32_t depth_multiplier; // TODO Remove, as it can be calculated.
77 int32_t stride_height;
79 int32_t dilation_height_factor;
80 int32_t dilation_width_factor;
81 Activation activation;
86 Activation activation;
89 struct FullyConnectedParams
91 Activation activation;
92 bool keep_num_dims = false;
106 struct InstanceNormParams
109 Activation activation;
114 Activation activation;
117 struct LeakyReluParams
122 struct LocalResponseNormalizationParams
130 struct MirrorPadParams
137 Activation activation;
147 int32_t values_count;
154 int32_t filter_height;
155 int32_t filter_width;
156 int32_t stride_height;
157 int32_t stride_width;
158 Activation activation;
166 struct ResizeBilinearParams
169 bool half_pixel_centers;
172 struct ResizeNearestNeighborParams
175 bool half_pixel_centers;
180 loco::DataType out_type;
185 Activation activation;
190 bool asymmetric_quantize_inputs;
192 Activation activation;
195 struct SpaceToDepthParams
205 struct StridedSliceParams
209 int32_t ellipsis_mask;
210 int32_t new_axis_mask;
211 int32_t shrink_axis_mask;
216 std::vector<int32_t> squeeze_dims;
219 struct TransposeConvParams
222 int32_t stride_height;
223 int32_t stride_width;
224 Activation activation;
227 struct UnidirectionalSequenceLSTMParams
229 Activation activation;
233 bool asymmetric_quantize_inputs;
241 } // namespace luci_interpreter
243 #endif // LUCI_INTERPRETER_CORE_KERNELPARAMS_H