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.
17 #include "convolution_kernel_byx8_f4__fs_bs_yx_bsv4_fsv32.h"
18 #include "kernel_selector_utils.h"
20 namespace kernel_selector {
22 ParamsKey ConvolutionKernel_byx8_f4__fs_bs_yx_bsv4_fsv32::GetSupportedKey() const
25 k.EnableInputDataType(Datatype::INT8);
26 k.EnableOutputDataType(Datatype::INT8);
27 k.EnableInputWeightsType(WeightsType::INT8);
28 k.EnableInputLayout(DataLayout::byx8_f4);
29 k.EnableOutputLayout(DataLayout::fs_bs_yx_bsv4_fsv32);
30 k.EnableTensorOffset();
31 k.EnableTensorPitches();
33 k.EnableBiasPerFeature();
35 k.EnableInt8Quantization();
36 k.EnableOutputCalibration();
41 bool ConvolutionKernel_byx8_f4__fs_bs_yx_bsv4_fsv32::Validate(const Params& p, const optional_params& o) const
43 if (!Parent::Validate(p, o))
48 const convolution_params& params = static_cast<const convolution_params&>(p);
50 // this kernel is designed for quantization use case
51 if (!params.int8_quantization)
57 ConvolutionKernelBase::DispatchData ConvolutionKernel_byx8_f4__fs_bs_yx_bsv4_fsv32::SetDefault(const convolution_params& arg, int) const
59 DispatchData runInfo = ConvolutionKernelBase::SetDefault(arg);
61 runInfo.effiency = FORCE_PRIORITY_1;
63 runInfo.gws0 = (arg.output.Batch().v * arg.output.Feature().v) / 4;
64 runInfo.gws1 = arg.output.X().v / 8;
65 runInfo.gws2 = arg.output.Y().v / 4;
74 KernelsData ConvolutionKernel_byx8_f4__fs_bs_yx_bsv4_fsv32::GetKernelsData(const Params& params, const optional_params& options) const
76 KernelsData kd = GetCommonKernelsData(params, options, " -Dcl_intel_subgroups_char");
78 kd[0].estimatedTime = FORCE_PRIORITY_3;