2 // Copyright (c) 2016 Intel Corporation
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.
21 namespace kernel_selector
23 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
25 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
52 CONVOLUTION_GRAD_WEIGHTS,
55 FULLY_CONNECTED_GRAD_INPUT,
56 FULLY_CONNECTED_GRAD_WEIGHTS,
63 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
65 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
79 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
81 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
82 enum class WeightsType
90 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
91 // NonLinearActivation
92 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
93 enum class ActivationFunction
107 RELU_NEGATIVE_SLOPE_GRAD,
112 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
114 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
122 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
124 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
125 enum class PoolRemainder
131 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
133 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
140 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
142 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
143 enum class LookUpTableAxis
152 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
154 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
164 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
166 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
167 enum class ArgMaxMinAxis
176 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
178 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
179 enum class ArgMaxMinOut
185 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
187 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
188 enum class NormalizeMode
194 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
196 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
203 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
205 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
206 enum class KernelDividerMode
214 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
216 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
217 enum class EltwiseMode
232 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
234 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
235 enum class EltwiseInputMode
239 UNORDERED_ACCESS_INPUT_BUFFER,
240 INTERMEDIATE_RESULTS_INDEX,
244 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
246 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
247 enum class SoftmaxDim
254 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
256 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
257 enum class ReorderMode
268 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
270 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
271 enum class MeanSubtractMode
274 INSIDE_PARAMS, // the index is feature id (modulu size)
278 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
280 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
289 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
291 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
292 enum class ConcatAxis
300 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
302 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
303 enum class SampleType
309 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
311 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
312 struct NonLinearParams
317 NonLinearParams() = default;
318 NonLinearParams(const NonLinearParams&) = default;
319 NonLinearParams& operator=(const NonLinearParams&) = default;
320 NonLinearParams(float m, float n) : m(m), n(n) {}
323 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
325 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
326 template <typename T>
332 Size(const Size&) = default;
333 Size& operator=(const Size&) = default;
334 Size(T x, T y) : x(x), y(y) {}
337 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
339 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
340 enum class TuningMode
342 TUNING_DISABLED, // Tuning is disabled.
343 TUNING_USE_CACHE, // Tuning using the cached data (no on-line tuning for non-existing data).
344 TUNING_TUNE_AND_CACHE // Tuning using the cached data if exist, tune and update cache otherwise.
347 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
349 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
350 typedef Size<uint32_t> uSize;
351 typedef Size<size_t> stSize;