75e8c3bdec687178065023fccb22d25e89c0b1e1
[platform/upstream/dldt.git] / inference-engine / thirdparty / clDNN / kernel_selector / core / actual_kernels / convolution / convolution_kernel_bfyx_os_iyx_osv16_2_sg.h
1 // Copyright (c) 2016 Intel Corporation
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 //      http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14
15
16 #pragma once
17
18 #include "convolution_kernel_base.h"
19 #include <string>
20 #include <vector>
21
22 namespace kernel_selector {
23
24 class ConvolutionKernel_bfyx_os_iyx_osv16_2_sg : public ConvolutionKernelBase {
25 public:
26     using Parent = ConvolutionKernelBase;
27     ConvolutionKernel_bfyx_os_iyx_osv16_2_sg();
28     virtual ~ConvolutionKernel_bfyx_os_iyx_osv16_2_sg() {}
29
30     KernelsData GetKernelsData(const Params& params, const optional_params& options) const override;
31     KernelsData GetKernelsDataForAutoTune(const Params& params, const optional_params& options) const override;
32     ParamsKey GetSupportedKey() const override;
33
34 protected:
35     WeightsLayout GetPreferredWeightsLayout(const convolution_params &) const override;
36     JitConstants GetJitConstants(const convolution_params& params, const DispatchData& dispatchData) const override;
37     bool Validate(const Params& p, const optional_params& o) const override;
38     bool NeedPaddedInput() const override { return true; }
39     DispatchData SetDefault(const convolution_params& arg, int autoTuneIndex = -1) const override;
40
41 private:
42     struct AutoTuneOption {
43         size_t blockWidth;
44         size_t blockHeight;
45         size_t prefetch;
46         std::string exeMode;
47     };
48
49     AutoTuneOption GetAutoTuneOptions(const Params& arg, int autoTuneIndex) const;
50
51     std::vector<AutoTuneOption> autoTuneOptions = {};
52 };
53 }  // namespace kernel_selector