2 // Copyright (c) 2018 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.
17 #include "fused_conv_bn_scale_kernel_ref.h"
18 #include "kernel_selector_utils.h"
20 namespace kernel_selector {
22 ParamsKey fused_conv_bn_scale_kernel_ref::GetSupportedKey() const
25 k.EnableInputDataType(Datatype::F32);
26 k.EnableOutputDataType(Datatype::F32);
27 k.EnableInputWeightsType(WeightsType::F32);
28 k.EnableInputLayout(DataLayout::bfyx);
29 k.EnableOutputLayout(DataLayout::bfyx);
30 k.EnableTensorOffset();
31 k.EnableTensorPitches();
32 k.EnableBiasPerFeature();
33 k.EnableNonBiasTerm();
34 k.EnableSplitSupport();
40 fused_conv_bn_scale_kernel_base::DispatchData fused_conv_bn_scale_kernel_ref::SetDefault(const fused_conv_bn_scale_params& arg) const
42 DispatchData runInfo = fused_conv_bn_scale_kernel_base::SetDefault(arg);
44 runInfo.effiency = DONT_USE_IF_HAVE_SOMETHING_ELSE;
46 runInfo.gws0 = arg.output.Batch().v;
47 runInfo.gws1 = arg.output.Feature().v;
50 runInfo.lws0 = std::min(std::max(runInfo.gws0, static_cast<size_t>(1)), static_cast<size_t>(32));
51 while (runInfo.gws0 % runInfo.lws0 != 0)
61 JitConstants fused_conv_bn_scale_kernel_ref::GetJitConstants(const fused_conv_bn_scale_params& params, const DispatchData& runInfo) const
63 auto jit = Parent::GetJitConstants(params, runInfo);
68 KernelsData fused_conv_bn_scale_kernel_ref::GetKernelsData(const Params& params, const optional_params& options) const
70 KernelsData kd = GetCommonKernelsData(params, options, DONT_USE_IF_HAVE_SOMETHING_ELSE);