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_params.h"
20 namespace kernel_selector
22 std::string convolution_params::to_string() const
26 s << base_params::to_string() << "_";
29 s << "no_bias" << "_";
33 s << "bias_" << bias[0].PhysicalSize() << "_";
35 s << filterSize.x << "_" << filterSize.y << "_";
36 s << stride.x << "_" << stride.y << "_";
37 s << dilation.x << "_" << dilation.y << "_";
38 s << padding.x << "_" << padding.y << "_";
44 ParamsKey convolution_params::GetParamsKey() const
46 ParamsKey k = weight_bias_params::GetParamsKey();
50 k.EnableSplitSupport();
53 if (dilation.x != 1 ||
59 if (depthwise_separable_opt)
61 k.EnableDepthwiseSeparableOpt();
69 if (int8_quantization)
71 k.EnableInt8Quantization();
74 if (output_calibration)
76 k.EnableOutputCalibration();
79 if (local_convolution)
81 k.EnableLocalConvolution();
84 if (groups > 1 && !depthwise_separable_opt)
86 k.EnableGroupedConvolution();