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;
101 struct InstanceNormParams
104 Activation activation;
109 Activation activation;
112 struct LeakyReluParams
117 struct LocalResponseNormalizationParams
125 struct MirrorPadParams
132 Activation activation;
142 int32_t values_count;
149 int32_t filter_height;
150 int32_t filter_width;
151 int32_t stride_height;
152 int32_t stride_width;
153 Activation activation;
161 struct ResizeBilinearParams
164 bool half_pixel_centers;
167 struct ResizeNearestNeighborParams
170 bool half_pixel_centers;
175 loco::DataType out_type;
180 Activation activation;
185 bool asymmetric_quantize_inputs;
187 Activation activation;
190 struct SpaceToDepthParams
200 struct StridedSliceParams
204 int32_t ellipsis_mask;
205 int32_t new_axis_mask;
206 int32_t shrink_axis_mask;
211 std::vector<int32_t> squeeze_dims;
214 struct TransposeConvParams
217 int32_t stride_height;
218 int32_t stride_width;
221 struct UnidirectionalSequenceLSTMParams
223 Activation activation;
227 bool asymmetric_quantize_inputs;
235 } // namespace luci_interpreter
237 #endif // LUCI_INTERPRETER_CORE_KERNELPARAMS_H