[IE CLDNN] Base kernels refactoring (#2758)

This commit is contained in:
Vladimir Paramuzov 2020-10-22 14:42:42 +03:00 committed by GitHub
parent e364271cf6
commit 16a73508bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
54 changed files with 211 additions and 211 deletions

View File

@ -1,4 +1,4 @@
// Copyright (c) 2016 Intel Corporation
// Copyright (c) 2016-2020 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@ -15,7 +15,7 @@
#pragma once
#include "common_kernel_base.h"
#include "kernel_base_opencl.h"
namespace kernel_selector {
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@ -56,10 +56,10 @@ struct activation_fuse_params : fuse_params {
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// ActivationKernelBase
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
class ActivationKernelBase : public common_kernel_base {
class ActivationKernelBase : public KernelBaseOpenCL {
public:
using DispatchData = CommonDispatchData;
using common_kernel_base::common_kernel_base;
using KernelBaseOpenCL::KernelBaseOpenCL;
virtual ~ActivationKernelBase() {}

View File

@ -1,5 +1,5 @@
/*
// Copyright (c) 2018 Intel Corporation
// Copyright (c) 2018-2020 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@ -16,7 +16,7 @@
#pragma once
#include "common_kernel_base.h"
#include "kernel_base_opencl.h"
#include "kernel_selector_params.h"
namespace kernel_selector {
@ -51,9 +51,9 @@ struct arg_max_min_optional_params : optional_params {
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// ArgMaxMinKernelBase
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
class ArgMaxMinKernelBase : public common_kernel_base {
class ArgMaxMinKernelBase : public KernelBaseOpenCL {
public:
using common_kernel_base::common_kernel_base;
using KernelBaseOpenCL::KernelBaseOpenCL;
virtual ~ArgMaxMinKernelBase() {}
struct DispatchData : public CommonDispatchData {
@ -65,4 +65,4 @@ protected:
virtual DispatchData SetDefault(const arg_max_min_params& params) const;
KernelsData GetCommonKernelsData(const Params& params, const optional_params&, float estimatedTime) const;
};
} // namespace kernel_selector
} // namespace kernel_selector

View File

@ -1,5 +1,5 @@
/*
// Copyright (c) 2018 Intel Corporation
// Copyright (c) 2018-2020 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@ -16,7 +16,7 @@
#pragma once
#include "common_kernel_base.h"
#include "kernel_base_opencl.h"
#include "kernel_selector_params.h"
namespace kernel_selector {
@ -44,9 +44,9 @@ struct average_unpooling_optional_params : optional_params {
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// AverageUnpoolingKernelBase
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
class AverageUnpoolingKernelBase : public common_kernel_base {
class AverageUnpoolingKernelBase : public KernelBaseOpenCL {
public:
using common_kernel_base::common_kernel_base;
using KernelBaseOpenCL::KernelBaseOpenCL;
virtual ~AverageUnpoolingKernelBase() {}
struct DispatchData : public CommonDispatchData {
@ -59,4 +59,4 @@ protected:
virtual DispatchData SetDefault(const average_unpooling_params& params) const;
KernelsData GetCommonKernelsData(const Params& params, const optional_params&, float estimatedTime) const;
};
} // namespace kernel_selector
} // namespace kernel_selector

View File

@ -16,7 +16,7 @@
#pragma once
#include "common_kernel_base.h"
#include "kernel_base_opencl.h"
#include "kernel_selector_params.h"
#include <vector>
@ -46,9 +46,9 @@ struct batch_to_space_fuse_params : fuse_params {
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// BatchToSpaceKernelBase
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
class BatchToSpaceKernelBase : public common_kernel_base {
class BatchToSpaceKernelBase : public KernelBaseOpenCL {
public:
using common_kernel_base::common_kernel_base;
using KernelBaseOpenCL::KernelBaseOpenCL;
virtual ~BatchToSpaceKernelBase() {}
struct DispatchData : public CommonDispatchData {};

View File

@ -1,4 +1,4 @@
// Copyright (c) 2018 Intel Corporation
// Copyright (c) 2018-2020 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@ -14,7 +14,7 @@
#pragma once
#include "common_kernel_base.h"
#include "kernel_base_opencl.h"
#include "kernel_selector_params.h"
namespace kernel_selector {
@ -46,9 +46,9 @@ struct border_optional_params : optional_params {
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// BorderKernelBase
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
class BorderKernelBase : public common_kernel_base {
class BorderKernelBase : public KernelBaseOpenCL {
public:
using common_kernel_base::common_kernel_base;
using KernelBaseOpenCL::KernelBaseOpenCL;
using DispatchData = CommonDispatchData;

View File

@ -1,4 +1,4 @@
// Copyright (c) 2018-2019 Intel Corporation
// Copyright (c) 2018-2020 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@ -14,7 +14,7 @@
#pragma once
#include "common_kernel_base.h"
#include "kernel_base_opencl.h"
#include "kernel_selector_params.h"
#include <vector>
@ -37,9 +37,9 @@ struct broadcast_optional_params : optional_params {
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// BroadcastKernelBase
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
class BroadcastKernelBase : public common_kernel_base {
class BroadcastKernelBase : public KernelBaseOpenCL {
public:
using common_kernel_base::common_kernel_base;
using KernelBaseOpenCL::KernelBaseOpenCL;
using DispatchData = CommonDispatchData;

View File

@ -1,4 +1,4 @@
// Copyright (c) 2016 Intel Corporation
// Copyright (c) 2016-2020 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@ -14,7 +14,7 @@
#pragma once
#include "common_kernel_base.h"
#include "kernel_base_opencl.h"
#include "kernel_selector_params.h"
namespace kernel_selector {
@ -58,9 +58,9 @@ struct concatenation_optional_params : optional_params {
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// ConcatenationKernelBase
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
class ConcatenationKernelBase : public common_kernel_base {
class ConcatenationKernelBase : public KernelBaseOpenCL {
public:
using common_kernel_base::common_kernel_base;
using KernelBaseOpenCL::KernelBaseOpenCL;
virtual ~ConcatenationKernelBase() {}
using DispatchData = CommonDispatchData;

View File

@ -1,5 +1,5 @@
/*
// Copyright (c) 2019 Intel Corporation
// Copyright (c) 2019-2020 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@ -20,9 +20,9 @@
namespace kernel_selector {
class DeformableConvolutionKernel_bfyx_interp : public common_kernel_base {
class DeformableConvolutionKernel_bfyx_interp : public KernelBaseOpenCL {
public:
DeformableConvolutionKernel_bfyx_interp() : common_kernel_base("deformable_convolution_gpu_bfyx_interp") {}
DeformableConvolutionKernel_bfyx_interp() : KernelBaseOpenCL("deformable_convolution_gpu_bfyx_interp") {}
virtual ~DeformableConvolutionKernel_bfyx_interp() {}
KernelsData GetKernelsData(const Params& params, const optional_params& options) const override;

View File

@ -13,7 +13,7 @@
// limitations under the License.
#pragma once
#include "common_kernel_base.h"
#include "kernel_base_opencl.h"
#include "kernel_selector_params.h"
#include <string>
@ -37,9 +37,9 @@ struct ctc_greedy_decoder_optional_params : optional_params {
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// CTCGreedyDecoderKernelBase
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
class CTCGreedyDecoderKernelBase : public common_kernel_base {
class CTCGreedyDecoderKernelBase : public KernelBaseOpenCL {
public:
using common_kernel_base::common_kernel_base;
using KernelBaseOpenCL::KernelBaseOpenCL;
virtual ~CTCGreedyDecoderKernelBase() {}
using DispatchData = CommonDispatchData;

View File

@ -16,7 +16,7 @@
#pragma once
#include "common_kernel_base.h"
#include "kernel_base_opencl.h"
namespace kernel_selector {
@ -40,9 +40,9 @@ struct cum_sum_optional_params : optional_params {
cum_sum_optional_params() : optional_params(KernelType::CUM_SUM) {}
};
class CumSumKernelBase : public common_kernel_base {
class CumSumKernelBase : public KernelBaseOpenCL {
public:
using common_kernel_base::common_kernel_base;
using KernelBaseOpenCL::KernelBaseOpenCL;
virtual ~CumSumKernelBase() = default;
struct DispatchData : public CommonDispatchData {

View File

@ -16,7 +16,7 @@
#pragma once
#include "common_kernel_base.h"
#include "kernel_base_opencl.h"
#include "kernel_selector_params.h"
namespace kernel_selector {
@ -48,9 +48,9 @@ struct depth_to_space_fuse_params : fuse_params {
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// DepthToSpaceKernelBase
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
class DepthToSpaceKernelBase : public common_kernel_base {
class DepthToSpaceKernelBase : public KernelBaseOpenCL {
public:
using common_kernel_base::common_kernel_base;
using KernelBaseOpenCL::KernelBaseOpenCL;
virtual ~DepthToSpaceKernelBase() {}
struct DispatchData : public CommonDispatchData {

View File

@ -1,4 +1,4 @@
// Copyright (c) 2018 Intel Corporation
// Copyright (c) 2018-2020 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@ -15,7 +15,7 @@
#pragma once
#include "common_kernel_base.h"
#include "kernel_base_opencl.h"
#include "kernel_selector_params.h"
namespace kernel_selector {
@ -64,9 +64,9 @@ struct detection_output_optional_params : optional_params {
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// DetectionOutputKernelBase
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
class DetectionOutputKernelBase : public common_kernel_base {
class DetectionOutputKernelBase : public KernelBaseOpenCL {
public:
using common_kernel_base ::common_kernel_base;
using KernelBaseOpenCL ::KernelBaseOpenCL;
virtual ~DetectionOutputKernelBase() {}
using DispatchData = CommonDispatchData;
@ -75,4 +75,4 @@ protected:
JitConstants GetJitConstants(const detection_output_params& params) const;
virtual DispatchData SetDefault(const detection_output_params& params) const;
};
} // namespace kernel_selector
} // namespace kernel_selector

View File

@ -1,4 +1,4 @@
// Copyright (c) 2016 Intel Corporation
// Copyright (c) 2016-2020 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@ -15,7 +15,7 @@
#pragma once
#include "common_kernel_base.h"
#include "kernel_base_opencl.h"
#include <vector>
namespace kernel_selector {
@ -112,9 +112,9 @@ struct scale_fuse_params : fuse_params {
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// EltwiseKernelBase
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
class EltwiseKernelBase : public common_kernel_base {
class EltwiseKernelBase : public KernelBaseOpenCL {
public:
using common_kernel_base::common_kernel_base;
using KernelBaseOpenCL::KernelBaseOpenCL;
virtual ~EltwiseKernelBase() {}
using DispatchData = CommonDispatchData;

View File

@ -16,7 +16,7 @@
#pragma once
#include "common_kernel_base.h"
#include "kernel_base_opencl.h"
#include "kernel_selector_params.h"
namespace kernel_selector {
@ -42,9 +42,9 @@ struct embedding_bag_optional_params : optional_params {
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// EmbeddingBagKernelRef
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
class EmbeddingBagKernelRef : public common_kernel_base {
class EmbeddingBagKernelRef : public KernelBaseOpenCL {
public:
EmbeddingBagKernelRef() : common_kernel_base("embedding_bag_ref") {}
EmbeddingBagKernelRef() : KernelBaseOpenCL("embedding_bag_ref") {}
virtual ~EmbeddingBagKernelRef() = default;
protected:

View File

@ -14,7 +14,7 @@
#pragma once
#include "common_kernel_base.h"
#include "kernel_base_opencl.h"
#include "kernel_selector_params.h"
#include <vector>
@ -41,9 +41,9 @@ struct extract_image_patches_optional_params : optional_params {
extract_image_patches_optional_params() : optional_params(KernelType::EXTRACT_IMAGE_PATCHES) {}
};
class ExtractImagePatchesKernelBase : public common_kernel_base {
class ExtractImagePatchesKernelBase : public KernelBaseOpenCL {
public:
using common_kernel_base::common_kernel_base;
using KernelBaseOpenCL::KernelBaseOpenCL;
using DispatchData = CommonDispatchData;
virtual ~ExtractImagePatchesKernelBase() {}

View File

@ -16,7 +16,7 @@
#pragma once
#include "common_kernel_base.h"
#include "kernel_base_opencl.h"
namespace kernel_selector {
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@ -37,9 +37,9 @@ struct gather_optional_params : optional_params {
gather_optional_params() : optional_params(KernelType::GATHER) {}
};
class GatherKernelRef : public common_kernel_base {
class GatherKernelRef : public KernelBaseOpenCL {
public:
GatherKernelRef() : common_kernel_base("gather_ref") {}
GatherKernelRef() : KernelBaseOpenCL("gather_ref") {}
virtual ~GatherKernelRef() {}
virtual JitConstants GetJitConstants(const gather_params& params) const;
virtual CommonDispatchData SetDefault(const gather_params& params, const optional_params&) const;

View File

@ -1,4 +1,4 @@
// Copyright (c) 2019 Intel Corporation
// Copyright (c) 2019-2020 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@ -14,7 +14,7 @@
#pragma once
#include "common_kernel_base.h"
#include "kernel_base_opencl.h"
#include "kernel_selector_params.h"
namespace kernel_selector {
@ -34,9 +34,9 @@ struct gather_tree_optional_params : optional_params {
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// BorderKernelBase
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
class GatherTreeKernelBase : public common_kernel_base {
class GatherTreeKernelBase : public KernelBaseOpenCL {
public:
using common_kernel_base::common_kernel_base;
using KernelBaseOpenCL::KernelBaseOpenCL;
using DispatchData = CommonDispatchData;
protected:

View File

@ -14,7 +14,7 @@
#pragma once
#include "common_kernel_base.h"
#include "kernel_base_opencl.h"
#include "kernel_selector_params.h"
namespace kernel_selector {
@ -48,9 +48,9 @@ struct gemm_optional_params : optional_params {
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// BorderKernelBase
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
class GemmKernelBase : public common_kernel_base {
class GemmKernelBase : public KernelBaseOpenCL {
public:
using common_kernel_base::common_kernel_base;
using KernelBaseOpenCL::KernelBaseOpenCL;
using FusedOpDesc = fused_operation_desc;
using DispatchData = CommonDispatchData;
virtual ~GemmKernelBase() {}

View File

@ -13,7 +13,7 @@
// limitations under the License.
#pragma once
#include "common_kernel_base.h"
#include "kernel_base_opencl.h"
#include "kernel_selector_params.h"
#include <string>
@ -37,9 +37,9 @@ struct grn_optional_params : optional_params {
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// GRNKernelBase
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
class GRNKernelBase : public common_kernel_base {
class GRNKernelBase : public KernelBaseOpenCL {
public:
using common_kernel_base::common_kernel_base;
using KernelBaseOpenCL::KernelBaseOpenCL;
virtual ~GRNKernelBase() {}
using DispatchData = CommonDispatchData;

View File

@ -18,7 +18,7 @@
namespace kernel_selector {
bool LRNKernelBase::Validate(const Params& p, const optional_params& o) const {
if (!common_kernel_base::Validate(p, o) || p.GetType() != KernelType::LRN || o.GetType() != KernelType::LRN) {
if (!KernelBaseOpenCL::Validate(p, o) || p.GetType() != KernelType::LRN || o.GetType() != KernelType::LRN) {
return false;
}

View File

@ -1,4 +1,4 @@
// Copyright (c) 2016 Intel Corporation
// Copyright (c) 2016-2020 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@ -15,7 +15,7 @@
#pragma once
#include "common_kernel_base.h"
#include "kernel_base_opencl.h"
#include "kernel_selector_params.h"
namespace kernel_selector {
@ -52,9 +52,9 @@ struct lrn_optional_params : optional_params {
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// lrn_kernel_base
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
class LRNKernelBase : public common_kernel_base {
class LRNKernelBase : public KernelBaseOpenCL {
public:
using common_kernel_base::common_kernel_base;
using KernelBaseOpenCL::KernelBaseOpenCL;
virtual ~LRNKernelBase() {}
using DispatchData = CommonDispatchData;

View File

@ -1,5 +1,5 @@
/*
// Copyright (c) 2016 Intel Corporation
// Copyright (c) 2016-2020 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@ -16,7 +16,7 @@
#pragma once
#include "common_kernel_base.h"
#include "kernel_base_opencl.h"
#include "kernel_selector_params.h"
#include <vector>
#include <map>
@ -82,9 +82,9 @@ struct lstm_elt_optional_params : optional_params {
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// LSTMEltKernelBase
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
class LSTMEltKernelBase : public common_kernel_base {
class LSTMEltKernelBase : public KernelBaseOpenCL {
public:
using common_kernel_base::common_kernel_base;
using KernelBaseOpenCL::KernelBaseOpenCL;
virtual ~LSTMEltKernelBase() {}
struct DispatchData : public CommonDispatchData {};
@ -101,4 +101,4 @@ protected:
return true;
}
};
} // namespace kernel_selector
} // namespace kernel_selector

View File

@ -1,5 +1,5 @@
/*
// Copyright (c) 2018 Intel Corporation
// Copyright (c) 2018-2020 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@ -16,7 +16,7 @@
#pragma once
#include "common_kernel_base.h"
#include "kernel_base_opencl.h"
#include "kernel_selector_params.h"
namespace kernel_selector {
@ -71,9 +71,9 @@ struct lstm_gemm_optional_params : optional_params {
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// LSTMGemmKernelBase
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
class LSTMGemmKernelBase : public common_kernel_base {
class LSTMGemmKernelBase : public KernelBaseOpenCL {
public:
using common_kernel_base::common_kernel_base;
using KernelBaseOpenCL::KernelBaseOpenCL;
virtual ~LSTMGemmKernelBase() {}
struct DispatchData : public CommonDispatchData {};
@ -90,4 +90,4 @@ protected:
return true;
}
};
} // namespace kernel_selector
} // namespace kernel_selector

View File

@ -1,5 +1,5 @@
/*
// Copyright (c) 2019 Intel Corporation
// Copyright (c) 2019-2020 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@ -16,7 +16,7 @@
#pragma once
#include "weight_bias_params.h"
#include "common_kernel_base.h"
#include "kernel_base_opencl.h"
#include "kernel_selector_params.h"
namespace kernel_selector {
@ -39,9 +39,9 @@ struct lstm_dynamic_input_optional_params : weight_bias_optional_params {
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// LSTM_DynamicInputKernelBase
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
class LSTM_DynamicInputKernelBase : public common_kernel_base {
class LSTM_DynamicInputKernelBase : public KernelBaseOpenCL {
public:
using common_kernel_base::common_kernel_base;
using KernelBaseOpenCL::KernelBaseOpenCL;
virtual ~LSTM_DynamicInputKernelBase() {}
struct DispatchData : public CommonDispatchData {};

View File

@ -1,5 +1,5 @@
/*
// Copyright (c) 2019 Intel Corporation
// Copyright (c) 2019-2020 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@ -16,7 +16,7 @@
#pragma once
#include "common_kernel_base.h"
#include "kernel_base_opencl.h"
#include "kernel_selector_params.h"
namespace kernel_selector {
@ -93,9 +93,9 @@ struct lstm_dynamic_optional_params : optional_params {
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// LSTM_DynamicTimeloopKernelBase
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
class LSTM_DynamicTimeloopKernelBase : public common_kernel_base {
class LSTM_DynamicTimeloopKernelBase : public KernelBaseOpenCL {
public:
using common_kernel_base::common_kernel_base;
using KernelBaseOpenCL::KernelBaseOpenCL;
virtual ~LSTM_DynamicTimeloopKernelBase() {}
struct DispatchData : public CommonDispatchData {};

View File

@ -1,4 +1,4 @@
// Copyright (c) 2018 Intel Corporation
// Copyright (c) 2018-2020 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@ -15,7 +15,7 @@
#pragma once
#include "common_kernel_base.h"
#include "kernel_base_opencl.h"
#include "kernel_selector_params.h"
namespace kernel_selector {
@ -38,9 +38,9 @@ struct max_unpooling_optional_params : optional_params {
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// MaxUnpoolingKernelBase
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
class MaxUnpoolingKernelBase : public common_kernel_base {
class MaxUnpoolingKernelBase : public KernelBaseOpenCL {
public:
using common_kernel_base::common_kernel_base;
using KernelBaseOpenCL::KernelBaseOpenCL;
virtual ~MaxUnpoolingKernelBase() {}
struct DispatchData : public CommonDispatchData {
@ -53,4 +53,4 @@ protected:
virtual DispatchData SetDefault(const max_unpooling_params& params) const;
KernelsData GetCommonKernelsData(const Params& params, const optional_params&, float estimatedTime) const;
};
} // namespace kernel_selector
} // namespace kernel_selector

View File

@ -15,7 +15,7 @@
#pragma once
#include "common_kernel_base.h"
#include "kernel_base_opencl.h"
#include "kernel_selector_params.h"
#include <string>
@ -52,9 +52,9 @@ struct mvn_optional_params : optional_params {
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// MVNKernelBase
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
class MVNKernelBase : public common_kernel_base {
class MVNKernelBase : public KernelBaseOpenCL {
public:
using common_kernel_base::common_kernel_base;
using KernelBaseOpenCL::KernelBaseOpenCL;
virtual ~MVNKernelBase() {}
struct DispatchData : public CommonDispatchData {

View File

@ -14,7 +14,7 @@
#pragma once
#include "common_kernel_base.h"
#include "kernel_base_opencl.h"
#include "kernel_selector_params.h"
namespace kernel_selector {
@ -47,9 +47,9 @@ struct normalize_optional_params : optional_params {
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// NormalizeKernelBase
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
class NormalizeKernelBase : public common_kernel_base {
class NormalizeKernelBase : public KernelBaseOpenCL {
public:
using common_kernel_base::common_kernel_base;
using KernelBaseOpenCL::KernelBaseOpenCL;
virtual ~NormalizeKernelBase() {}
using DispatchData = CommonDispatchData;

View File

@ -1,4 +1,4 @@
// Copyright (c) 2019 Intel Corporation
// Copyright (c) 2019-2020 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@ -14,7 +14,7 @@
#pragma once
#include "common_kernel_base.h"
#include "kernel_base_opencl.h"
#include "kernel_selector_params.h"
namespace kernel_selector {
@ -40,9 +40,9 @@ struct one_hot_optional_params : optional_params {
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// OneHotKernelBase
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
class OneHotKernelBase : public common_kernel_base {
class OneHotKernelBase : public KernelBaseOpenCL {
public:
using common_kernel_base::common_kernel_base;
using KernelBaseOpenCL::KernelBaseOpenCL;
using DispatchData = CommonDispatchData;

View File

@ -1,4 +1,4 @@
// Copyright (c) 2016-2019 Intel Corporation
// Copyright (c) 2016-2020 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@ -15,7 +15,7 @@
#pragma once
#include "common_kernel_base.h"
#include "kernel_base_opencl.h"
#include <vector>
namespace kernel_selector {
@ -40,13 +40,13 @@ struct permute_optional_params : optional_params {
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// PermuteKernelRef
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
class PermuteKernelRef : public common_kernel_base {
class PermuteKernelRef : public KernelBaseOpenCL {
public:
PermuteKernelRef() : common_kernel_base("permute_ref") {}
PermuteKernelRef() : KernelBaseOpenCL("permute_ref") {}
virtual ~PermuteKernelRef() {}
JitConstants GetJitConstants(const permute_params& params) const;
KernelsData GetKernelsData(const Params& params, const optional_params& options) const override;
ParamsKey GetSupportedKey() const override;
};
} // namespace kernel_selector
} // namespace kernel_selector

View File

@ -1,4 +1,4 @@
// Copyright (c) 2016 Intel Corporation
// Copyright (c) 2016-2020 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@ -15,7 +15,7 @@
#pragma once
#include "common_kernel_base.h"
#include "kernel_base_opencl.h"
#include "kernel_selector_params.h"
namespace kernel_selector {
@ -54,9 +54,9 @@ struct pooling_optional_params : optional_params {
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// PoolingKernelBase
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
class PoolingKernelBase : public common_kernel_base {
class PoolingKernelBase : public KernelBaseOpenCL {
public:
using common_kernel_base::common_kernel_base;
using KernelBaseOpenCL::KernelBaseOpenCL;
virtual ~PoolingKernelBase() {}
struct DispatchData : public CommonDispatchData {

View File

@ -1,4 +1,4 @@
// Copyright (c) 2018-2019 Intel Corporation
// Copyright (c) 2018-2020 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@ -14,7 +14,7 @@
#pragma once
#include "common_kernel_base.h"
#include "kernel_base_opencl.h"
#include "kernel_selector_params.h"
namespace kernel_selector {
@ -43,9 +43,9 @@ struct PyramidROIAlign_optional_params : optional_params {
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// PyramidROIAlignKernelBase
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
class PyramidROIAlignKernelBase : public common_kernel_base {
class PyramidROIAlignKernelBase : public KernelBaseOpenCL {
public:
using common_kernel_base::common_kernel_base;
using KernelBaseOpenCL::KernelBaseOpenCL;
virtual ~PyramidROIAlignKernelBase() {}
using DispatchData = CommonDispatchData;

View File

@ -1,4 +1,4 @@
// Copyright (c) 2019 Intel Corporation
// Copyright (c) 2019-2020 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@ -15,14 +15,14 @@
#pragma once
#include "common_kernel_base.h"
#include "kernel_base_opencl.h"
#include "quantize_kernel_params.h"
namespace kernel_selector {
class QuantizeKernelBase : public common_kernel_base {
class QuantizeKernelBase : public KernelBaseOpenCL {
public:
using common_kernel_base::common_kernel_base;
using KernelBaseOpenCL::KernelBaseOpenCL;
virtual ~QuantizeKernelBase() {}
bool Validate(const Params& p, const optional_params& o) const override;

View File

@ -15,7 +15,7 @@
#pragma once
#include "common_kernel_base.h"
#include "kernel_base_opencl.h"
namespace kernel_selector {
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

View File

@ -14,7 +14,7 @@
#pragma once
#include "common_kernel_base.h"
#include "kernel_base_opencl.h"
#include "kernel_selector_params.h"
namespace kernel_selector {
@ -41,9 +41,9 @@ struct reduce_optional_params : optional_params {
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// ReduceKernelBase
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
class ReduceKernelBase : public common_kernel_base {
class ReduceKernelBase : public KernelBaseOpenCL {
public:
using common_kernel_base::common_kernel_base;
using KernelBaseOpenCL::KernelBaseOpenCL;
using DispatchData = CommonDispatchData;
virtual ~ReduceKernelBase() {}

View File

@ -1,5 +1,5 @@
/*
// Copyright (c) 2018 Intel Corporation
// Copyright (c) 2018-2020 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@ -16,7 +16,7 @@
#pragma once
#include "common_kernel_base.h"
#include "kernel_base_opencl.h"
#include "kernel_selector_params.h"
namespace kernel_selector {
@ -49,9 +49,9 @@ struct region_yolo_optional_params : optional_params {
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// RegionYoloKernelRef
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
class RegionYoloKernelRef : public common_kernel_base {
class RegionYoloKernelRef : public KernelBaseOpenCL {
public:
RegionYoloKernelRef() : common_kernel_base("region_yolo_gpu_ref") {}
RegionYoloKernelRef() : KernelBaseOpenCL("region_yolo_gpu_ref") {}
virtual ~RegionYoloKernelRef() {}
using DispatchData = CommonDispatchData;

View File

@ -15,7 +15,7 @@
#pragma once
#include "common_kernel_base.h"
#include "kernel_base_opencl.h"
#include "kernel_selector_params.h"
#include <vector>
@ -94,9 +94,9 @@ struct reorder_weights_params : public Params {
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// ReorderKernelBase
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
class ReorderKernelBase : public common_kernel_base {
class ReorderKernelBase : public KernelBaseOpenCL {
public:
using common_kernel_base::common_kernel_base;
using KernelBaseOpenCL::KernelBaseOpenCL;
virtual ~ReorderKernelBase() {}
using DispatchData = CommonDispatchData;

View File

@ -1,5 +1,5 @@
/*
// Copyright (c) 2018 Intel Corporation
// Copyright (c) 2018-2020 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@ -16,7 +16,7 @@
#pragma once
#include "common_kernel_base.h"
#include "kernel_base_opencl.h"
#include "kernel_selector_params.h"
namespace kernel_selector {
@ -44,9 +44,9 @@ struct reorg_yolo_optional_params : optional_params {
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// ReorgYoloKernelRef
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
class ReorgYoloKernelRef : public common_kernel_base {
class ReorgYoloKernelRef : public KernelBaseOpenCL {
public:
ReorgYoloKernelRef() : common_kernel_base("reorg_yolo_gpu_ref") {}
ReorgYoloKernelRef() : KernelBaseOpenCL("reorg_yolo_gpu_ref") {}
virtual ~ReorgYoloKernelRef() {}
using DispatchData = CommonDispatchData;

View File

@ -1,4 +1,4 @@
// Copyright (c) 2016-2019 Intel Corporation
// Copyright (c) 2016-2020 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@ -14,7 +14,7 @@
#pragma once
#include "common_kernel_base.h"
#include "kernel_base_opencl.h"
#include <map>
@ -54,10 +54,10 @@ struct resample_optional_params : optional_params {
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// ResampleKernelBase
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
class ResampleKernelBase : public common_kernel_base {
class ResampleKernelBase : public KernelBaseOpenCL {
public:
using DispatchData = CommonDispatchData;
using common_kernel_base::common_kernel_base;
using KernelBaseOpenCL::KernelBaseOpenCL;
virtual ~ResampleKernelBase() {}

View File

@ -1,4 +1,4 @@
// Copyright (c) 2016-2019 Intel Corporation
// Copyright (c) 2016-2020 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@ -73,7 +73,7 @@ KernelsData ReshapeKernelRef::GetKernelsData(const Params& params, const optiona
}
bool ReshapeKernelRef::Validate(const Params& p, const optional_params& op) const {
if (!common_kernel_base::Validate(p, op))
if (!KernelBaseOpenCL::Validate(p, op))
return false;
const auto& rp = static_cast<const reshape_params&>(p);

View File

@ -1,4 +1,4 @@
// Copyright (c) 2016-2019 Intel Corporation
// Copyright (c) 2016-2020 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@ -14,7 +14,7 @@
#pragma once
#include "common_kernel_base.h"
#include "kernel_base_opencl.h"
namespace kernel_selector {
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@ -33,9 +33,9 @@ struct reshape_optional_params : optional_params {
reshape_optional_params() : optional_params(KernelType::RESHAPE) {}
};
class ReshapeKernelRef : public common_kernel_base {
class ReshapeKernelRef : public KernelBaseOpenCL {
public:
ReshapeKernelRef() : common_kernel_base("reshape_ref") {}
ReshapeKernelRef() : KernelBaseOpenCL("reshape_ref") {}
virtual ~ReshapeKernelRef() {}
KernelsData GetKernelsData(const Params& params, const optional_params& options) const override;

View File

@ -1,4 +1,4 @@
// Copyright (c) 2019 Intel Corporation
// Copyright (c) 2019-2020 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@ -14,7 +14,7 @@
#pragma once
#include "common_kernel_base.h"
#include "kernel_base_opencl.h"
namespace kernel_selector {
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@ -37,9 +37,9 @@ struct reverse_sequence_optional_params : optional_params {
reverse_sequence_optional_params() : optional_params(KernelType::REVERSE_SEQUENCE) {}
};
class ReverseSequenceKernelRef : public common_kernel_base {
class ReverseSequenceKernelRef : public KernelBaseOpenCL {
public:
ReverseSequenceKernelRef() : common_kernel_base("reverse_sequence_ref") {}
ReverseSequenceKernelRef() : KernelBaseOpenCL("reverse_sequence_ref") {}
virtual ~ReverseSequenceKernelRef() {}
virtual JitConstants GetJitConstants(const reverse_sequence_params& params) const;
virtual CommonDispatchData SetDefault(const reverse_sequence_params& params, const optional_params&) const;

View File

@ -1,4 +1,4 @@
// Copyright (c) 2019 Intel Corporation
// Copyright (c) 2019-2020 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@ -15,7 +15,7 @@
#pragma once
#include <iostream>
#include "common_kernel_base.h"
#include "kernel_base_opencl.h"
namespace kernel_selector {
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@ -57,9 +57,9 @@ struct roi_pooling_optional_params : optional_params {
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// ROIPoolingKernelBase
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
class ROIPoolingKernelBase : public common_kernel_base {
class ROIPoolingKernelBase : public KernelBaseOpenCL {
public:
using common_kernel_base::common_kernel_base;
using KernelBaseOpenCL::KernelBaseOpenCL;
virtual ~ROIPoolingKernelBase() {}
using DispatchData = CommonDispatchData;

View File

@ -16,7 +16,7 @@
#pragma once
#include "common_kernel_base.h"
#include "kernel_base_opencl.h"
namespace kernel_selector {
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@ -37,9 +37,9 @@ struct scatter_update_optional_params : optional_params {
scatter_update_optional_params() : optional_params(KernelType::SCATTER_UPDATE) {}
};
class ScatterUpdateKernelRef : public common_kernel_base {
class ScatterUpdateKernelRef : public KernelBaseOpenCL {
public:
ScatterUpdateKernelRef() : common_kernel_base("scatter_update_ref") {}
ScatterUpdateKernelRef() : KernelBaseOpenCL("scatter_update_ref") {}
virtual ~ScatterUpdateKernelRef() {}
virtual JitConstants GetJitConstants(const scatter_update_params& params) const;
virtual CommonDispatchData SetDefault(const scatter_update_params& params, const optional_params&, bool is_second) const;

View File

@ -1,4 +1,4 @@
// Copyright (c) 2018 Intel Corporation
// Copyright (c) 2018-2020 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@ -14,7 +14,7 @@
#pragma once
#include "common_kernel_base.h"
#include "kernel_base_opencl.h"
namespace kernel_selector {
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@ -36,9 +36,9 @@ struct select_optional_params : optional_params {
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// SelectKernelBase
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
class SelectKernelBase : public common_kernel_base {
class SelectKernelBase : public KernelBaseOpenCL {
public:
using common_kernel_base::common_kernel_base;
using KernelBaseOpenCL::KernelBaseOpenCL;
virtual ~SelectKernelBase() {}
using DispatchData = CommonDispatchData;

View File

@ -1,5 +1,5 @@
/*
// Copyright (c) 2019 Intel Corporation
// Copyright (c) 2019-2020 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@ -16,7 +16,7 @@
#pragma once
#include "common_kernel_base.h"
#include "kernel_base_opencl.h"
namespace kernel_selector {
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@ -38,9 +38,9 @@ struct shuffle_channels_optional_params : optional_params {
shuffle_channels_optional_params() : optional_params(KernelType::SHUFFLE_CHANNELS) {}
};
class ShuffleChannelsKernelRef : public common_kernel_base {
class ShuffleChannelsKernelRef : public KernelBaseOpenCL {
public:
ShuffleChannelsKernelRef() : common_kernel_base("shuffle_channels_ref") {}
ShuffleChannelsKernelRef() : KernelBaseOpenCL("shuffle_channels_ref") {}
virtual ~ShuffleChannelsKernelRef() {}
KernelsData GetKernelsData(const Params& params, const optional_params& options) const override;
ParamsKey GetSupportedKey() const override;

View File

@ -1,4 +1,4 @@
// Copyright (c) 2016 Intel Corporation
// Copyright (c) 2016-2020 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@ -14,7 +14,7 @@
#pragma once
#include "common_kernel_base.h"
#include "kernel_base_opencl.h"
#include "kernel_selector_params.h"
namespace kernel_selector {
@ -43,9 +43,9 @@ struct softmax_optional_params : optional_params {
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// SoftmaxKernelBase
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
class SoftmaxKernelBase : public common_kernel_base {
class SoftmaxKernelBase : public KernelBaseOpenCL {
public:
using common_kernel_base::common_kernel_base;
using KernelBaseOpenCL::KernelBaseOpenCL;
virtual ~SoftmaxKernelBase() {}
struct DispatchData : public CommonDispatchData {

View File

@ -16,7 +16,7 @@
#pragma once
#include "common_kernel_base.h"
#include "kernel_base_opencl.h"
#include "kernel_selector_params.h"
#include <vector>
@ -47,9 +47,9 @@ struct space_to_batch_fuse_params : fuse_params {
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// SpaceToBatchKernelBase
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
class SpaceToBatchKernelBase : public common_kernel_base {
class SpaceToBatchKernelBase : public KernelBaseOpenCL {
public:
using common_kernel_base::common_kernel_base;
using KernelBaseOpenCL::KernelBaseOpenCL;
virtual ~SpaceToBatchKernelBase() {}
struct DispatchData : public CommonDispatchData {};

View File

@ -16,7 +16,7 @@
#pragma once
#include "common_kernel_base.h"
#include "kernel_base_opencl.h"
namespace kernel_selector {
@ -40,9 +40,9 @@ struct space_to_depth_optional_params : optional_params {
space_to_depth_optional_params() : optional_params(KernelType::SPACE_TO_DEPTH) {}
};
class SpaceToDepthKernelRef : public common_kernel_base {
class SpaceToDepthKernelRef : public KernelBaseOpenCL {
public:
SpaceToDepthKernelRef() : common_kernel_base("space_to_depth_ref") {}
SpaceToDepthKernelRef() : KernelBaseOpenCL("space_to_depth_ref") {}
virtual ~SpaceToDepthKernelRef() = default;
KernelsData GetKernelsData(const Params& params, const optional_params& options) const override;
ParamsKey GetSupportedKey() const override;

View File

@ -14,7 +14,7 @@
#pragma once
#include "common_kernel_base.h"
#include "kernel_base_opencl.h"
#include <vector>
namespace kernel_selector {
@ -41,9 +41,9 @@ struct strided_slice_optional_params : optional_params {
strided_slice_optional_params() : optional_params(KernelType::STRIDED_SLICE) {}
};
class StridedSliceKernelRef : public common_kernel_base {
class StridedSliceKernelRef : public KernelBaseOpenCL {
public:
StridedSliceKernelRef() : common_kernel_base("strided_slice_ref") {}
StridedSliceKernelRef() : KernelBaseOpenCL("strided_slice_ref") {}
virtual ~StridedSliceKernelRef() {}
virtual JitConstants GetJitConstants(const strided_slice_params& params) const;
virtual CommonDispatchData SetDefault(const strided_slice_params& params, const optional_params&) const;

View File

@ -1,4 +1,4 @@
// Copyright (c) 2018 Intel Corporation
// Copyright (c) 2018-2020 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@ -14,7 +14,7 @@
#pragma once
#include "common_kernel_base.h"
#include "kernel_base_opencl.h"
namespace kernel_selector {
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@ -36,9 +36,9 @@ struct tile_optional_params : optional_params {
tile_optional_params() : optional_params(KernelType::TILE) {}
};
class TileKernelRef : public common_kernel_base {
class TileKernelRef : public KernelBaseOpenCL {
public:
TileKernelRef() : common_kernel_base("tile_ref") {}
TileKernelRef() : KernelBaseOpenCL("tile_ref") {}
virtual ~TileKernelRef() {}
virtual JitConstants GetJitConstants(const tile_params& params) const;

View File

@ -1,4 +1,4 @@
// Copyright (c) 2016-2019 Intel Corporation
// Copyright (c) 2016-2020 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "common_kernel_base.h"
#include "kernel_base_opencl.h"
#include <iostream>
#include <string>
#include <vector>
@ -72,7 +72,7 @@ public:
};
} // namespace
std::string common_kernel_base::GetEntryPoint(const std::string& templateName,
std::string KernelBaseOpenCL::GetEntryPoint(const std::string& templateName,
const std::string& layerID,
const optional_params& options) const {
std::string kernelID = layerID;
@ -89,7 +89,7 @@ std::string common_kernel_base::GetEntryPoint(const std::string& templateName,
return kernelID;
}
std::string common_kernel_base::CreateJit(const std::string& template_name,
std::string KernelBaseOpenCL::CreateJit(const std::string& template_name,
const JitConstants& constants,
const std::string& kernel_id) const {
class CodeBuilder code;
@ -109,7 +109,7 @@ std::string common_kernel_base::CreateJit(const std::string& template_name,
return jit;
}
Arguments common_kernel_base::GetArgsDesc(uint32_t num_of_input,
Arguments KernelBaseOpenCL::GetArgsDesc(uint32_t num_of_input,
bool use_weights,
bool use_bias,
uint32_t number_of_inputs_for_fused_prim) const {
@ -136,7 +136,7 @@ Arguments common_kernel_base::GetArgsDesc(uint32_t num_of_input,
return args;
}
std::shared_ptr<KernelString> common_kernel_base::GetKernelString(const std::string& name,
std::shared_ptr<KernelString> KernelBaseOpenCL::GetKernelString(const std::string& name,
const std::string& jit,
const std::string& entry_point,
const EngineInfo& engine_info,
@ -160,7 +160,7 @@ std::shared_ptr<KernelString> common_kernel_base::GetKernelString(const std::str
return kernel_string;
}
uint32_t common_kernel_base::GetFusedPrimitiveInputsCount(const Params &params) const {
uint32_t KernelBaseOpenCL::GetFusedPrimitiveInputsCount(const Params &params) const {
auto p = dynamic_cast<const base_params&>(params);
uint32_t fused_deps_total = 0;
for (auto fused_op : p.fused_ops) {
@ -170,18 +170,18 @@ uint32_t common_kernel_base::GetFusedPrimitiveInputsCount(const Params &params)
return fused_deps_total;
}
void common_kernel_base::FillCLKernelData(clKernelData& kernel,
const CommonDispatchData& dispatchData,
const EngineInfo& engine_info,
const std::string& kernelMapName,
const std::string& jit,
const std::string& entryPoint,
const std::string& exeMode,
bool weights,
bool bias,
int number_of_inputs,
uint32_t number_of_inputs_for_fused_prims) const {
CheckDispatchData(kernelMapName, dispatchData);
void KernelBaseOpenCL::FillCLKernelData(clKernelData& kernel,
const CommonDispatchData& dispatchData,
const EngineInfo& engine_info,
const std::string& kernelMapName,
const std::string& jit,
const std::string& entryPoint,
const std::string& exeMode,
bool weights,
bool bias,
int number_of_inputs,
uint32_t number_of_inputs_for_fused_prims) const {
KernelBase::CheckDispatchData(kernelMapName, dispatchData);
kernel.workGroups.global = dispatchData.gws;
kernel.workGroups.local = dispatchData.lws;
kernel.kernelString = GetKernelString(kernelMapName, jit, entryPoint, engine_info, exeMode);

View File

@ -22,10 +22,10 @@
namespace kernel_selector {
class common_kernel_base : public KernelBase {
class KernelBaseOpenCL : public KernelBase {
public:
using KernelBase::KernelBase;
virtual ~common_kernel_base() {}
virtual ~KernelBaseOpenCL() {}
protected:
virtual bool Validate(const Params&, const optional_params&) const { return true; }

View File

@ -1,5 +1,5 @@
/*
// Copyright (c) 2016 Intel Corporation
// Copyright (c) 2016-2020 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@ -16,19 +16,19 @@
#pragma once
#include "common_kernel_base.h"
#include "kernel_base_opencl.h"
#include "weight_bias_params.h"
namespace kernel_selector {
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// WeightsBiasKernelBase
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
class WeightBiasKernelBase : public common_kernel_base {
class WeightBiasKernelBase : public KernelBaseOpenCL {
public:
using common_kernel_base::common_kernel_base;
using KernelBaseOpenCL::KernelBaseOpenCL;
virtual ~WeightBiasKernelBase() {}
protected:
virtual JitConstants GetJitConstants(const weight_bias_params& params) const;
};
} // namespace kernel_selector
} // namespace kernel_selector