From feced4e7c8f200add89351eb1463f99cb5e1b170 Mon Sep 17 00:00:00 2001 From: Taylor Yeonbok Lee Date: Thu, 2 Jun 2022 14:41:12 +0900 Subject: [PATCH] Replaced impl factory API to get kernel_impl_param's pointer --- .../src/graph/impls/common/condition.cpp | 2 +- .../intel_gpu/src/graph/impls/common/loop.cpp | 2 +- .../src/graph/impls/common/wait_for_events.cpp | 6 +++--- .../src/graph/impls/cpu/detection_output.cpp | 2 +- .../graph/impls/cpu/non_max_suppression.cpp | 2 +- .../intel_gpu/src/graph/impls/cpu/proposal.cpp | 4 ++-- .../src/graph/impls/implementation_map.hpp | 16 ++++++++-------- .../src/graph/impls/ocl/activation.cpp | 8 ++++---- .../src/graph/impls/ocl/arg_max_min.cpp | 6 +++--- .../src/graph/impls/ocl/average_unpooling.cpp | 4 ++-- .../src/graph/impls/ocl/batch_to_space.cpp | 4 ++-- .../src/graph/impls/ocl/binary_convolution.cpp | 8 ++++---- .../intel_gpu/src/graph/impls/ocl/border.cpp | 4 ++-- .../src/graph/impls/ocl/broadcast.cpp | 6 +++--- .../src/graph/impls/ocl/concatenation.cpp | 8 ++++---- .../src/graph/impls/ocl/convert_color.cpp | 8 ++++---- .../src/graph/impls/ocl/convolution.cpp | 18 +++++++++--------- .../intel_gpu/src/graph/impls/ocl/crop.cpp | 6 +++--- .../src/graph/impls/ocl/ctc_greedy_decoder.cpp | 8 ++++---- .../intel_gpu/src/graph/impls/ocl/cum_sum.cpp | 4 ++-- .../src/graph/impls/ocl/custom_primitive.cpp | 4 ++-- .../src/graph/impls/ocl/deconvolution.cpp | 8 ++++---- .../graph/impls/ocl/deformable_convolution.cpp | 16 ++++++++-------- .../src/graph/impls/ocl/depth_to_space.cpp | 4 ++-- .../src/graph/impls/ocl/detection_output.cpp | 8 ++++---- .../intel_gpu/src/graph/impls/ocl/eltwise.cpp | 14 +++++++------- .../src/graph/impls/ocl/embedding_bag.cpp | 6 +++--- ...imental_detectron_roi_feature_extractor.cpp | 8 ++++---- .../ocl/experimental_detectron_topk_rois.cpp | 6 +++--- .../graph/impls/ocl/extract_image_patches.cpp | 4 ++-- .../src/graph/impls/ocl/fully_connected.cpp | 6 +++--- .../intel_gpu/src/graph/impls/ocl/gather.cpp | 8 ++++---- .../src/graph/impls/ocl/gather_elements.cpp | 6 +++--- .../src/graph/impls/ocl/gather_nd.cpp | 6 +++--- .../src/graph/impls/ocl/gather_tree.cpp | 6 +++--- .../intel_gpu/src/graph/impls/ocl/gemm.cpp | 8 ++++---- .../src/graph/impls/ocl/generic_layer.cpp | 2 +- .../intel_gpu/src/graph/impls/ocl/grn.cpp | 4 ++-- .../intel_gpu/src/graph/impls/ocl/lrn.cpp | 4 ++-- .../src/graph/impls/ocl/lstm_dynamic_input.cpp | 10 +++++----- .../graph/impls/ocl/lstm_dynamic_timeloop.cpp | 16 ++++++++-------- .../intel_gpu/src/graph/impls/ocl/lstm_elt.cpp | 6 +++--- .../src/graph/impls/ocl/lstm_gemm.cpp | 14 +++++++------- .../src/graph/impls/ocl/max_unpooling.cpp | 6 +++--- .../src/graph/impls/ocl/mutable_data.cpp | 2 +- .../intel_gpu/src/graph/impls/ocl/mvn.cpp | 4 ++-- .../graph/impls/ocl/non_max_suppression.cpp | 18 +++++++++--------- .../src/graph/impls/ocl/normalize.cpp | 6 +++--- .../intel_gpu/src/graph/impls/ocl/one_hot.cpp | 6 +++--- .../intel_gpu/src/graph/impls/ocl/permute.cpp | 6 +++--- .../intel_gpu/src/graph/impls/ocl/pooling.cpp | 8 ++++---- .../src/graph/impls/ocl/pyramid_roi_align.cpp | 16 ++++++++-------- .../intel_gpu/src/graph/impls/ocl/quantize.cpp | 8 ++++---- .../src/graph/impls/ocl/random_uniform.cpp | 8 ++++---- .../intel_gpu/src/graph/impls/ocl/range.cpp | 6 +++--- .../intel_gpu/src/graph/impls/ocl/reduce.cpp | 4 ++-- .../src/graph/impls/ocl/region_yolo.cpp | 4 ++-- .../intel_gpu/src/graph/impls/ocl/reorder.cpp | 16 ++++++++-------- .../src/graph/impls/ocl/reorg_yolo.cpp | 4 ++-- .../intel_gpu/src/graph/impls/ocl/resample.cpp | 6 +++--- .../intel_gpu/src/graph/impls/ocl/reshape.cpp | 4 ++-- .../src/graph/impls/ocl/reverse_sequence.cpp | 6 +++--- .../src/graph/impls/ocl/roi_align.cpp | 12 ++++++------ .../src/graph/impls/ocl/roi_pooling.cpp | 12 ++++++------ .../intel_gpu/src/graph/impls/ocl/scale.cpp | 8 ++++---- .../impls/ocl/scatter_elements_update.cpp | 8 ++++---- .../src/graph/impls/ocl/scatter_nd_update.cpp | 8 ++++---- .../src/graph/impls/ocl/scatter_update.cpp | 8 ++++---- .../intel_gpu/src/graph/impls/ocl/select.cpp | 6 +++--- .../intel_gpu/src/graph/impls/ocl/shape_of.cpp | 6 +++--- .../src/graph/impls/ocl/shuffle_channels.cpp | 4 ++-- .../intel_gpu/src/graph/impls/ocl/slice.cpp | 4 ++-- .../intel_gpu/src/graph/impls/ocl/softmax.cpp | 4 ++-- .../src/graph/impls/ocl/space_to_batch.cpp | 4 ++-- .../src/graph/impls/ocl/space_to_depth.cpp | 4 ++-- .../src/graph/impls/ocl/strided_slice.cpp | 4 ++-- .../intel_gpu/src/graph/impls/ocl/tile.cpp | 4 ++-- .../impls/onednn/concatenation_onednn.cpp | 2 +- .../graph/impls/onednn/convolution_onednn.cpp | 2 +- .../impls/onednn/deconvolution_onednn.cpp | 2 +- .../impls/onednn/fully_connected_onednn.cpp | 2 +- .../src/graph/impls/onednn/gemm_onednn.cpp | 2 +- .../src/graph/impls/onednn/pooling_onednn.cpp | 2 +- .../src/graph/impls/onednn/reorder_onednn.cpp | 2 +- .../graph/include/binary_convolution_inst.h | 4 ++-- .../src/graph/include/convolution_inst.h | 4 ++-- .../src/graph/include/deconvolution_inst.h | 4 ++-- .../include/deformable_convolution_inst.h | 4 ++-- .../src/graph/include/fully_connected_inst.h | 4 ++-- .../src/graph/include/primitive_type.h | 6 +++--- .../src/graph/include/primitive_type_base.h | 6 +++--- .../intel_gpu/src/graph/include/program_node.h | 6 +++--- 92 files changed, 293 insertions(+), 293 deletions(-) diff --git a/src/plugins/intel_gpu/src/graph/impls/common/condition.cpp b/src/plugins/intel_gpu/src/graph/impls/common/condition.cpp index 5babdca1623e59..92cedf20e6e308 100644 --- a/src/plugins/intel_gpu/src/graph/impls/common/condition.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/common/condition.cpp @@ -41,7 +41,7 @@ struct condition_impl : typed_primitive_impl { return ev; } - static primitive_impl* create(const condition_node& arg, const kernel_impl_params&) { return new condition_impl(arg); } + static primitive_impl* create(const condition_node& arg, std::shared_ptr) { return new condition_impl(arg); } void init_kernels() override {} diff --git a/src/plugins/intel_gpu/src/graph/impls/common/loop.cpp b/src/plugins/intel_gpu/src/graph/impls/common/loop.cpp index 5f91ec2b6b55e7..a9f6b36f4c081d 100644 --- a/src/plugins/intel_gpu/src/graph/impls/common/loop.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/common/loop.cpp @@ -164,7 +164,7 @@ struct loop_impl : typed_primitive_impl { return ev; } - static primitive_impl* create(const loop_node& arg, const kernel_impl_params&) { return new loop_impl(arg); } + static primitive_impl* create(const loop_node& arg, std::shared_ptr) { return new loop_impl(arg); } }; namespace detail { diff --git a/src/plugins/intel_gpu/src/graph/impls/common/wait_for_events.cpp b/src/plugins/intel_gpu/src/graph/impls/common/wait_for_events.cpp index ae0269ebc1868c..6a85557bce5f1e 100644 --- a/src/plugins/intel_gpu/src/graph/impls/common/wait_for_events.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/common/wait_for_events.cpp @@ -32,13 +32,13 @@ class wait_for_events_impl : public primitive_impl { bool validate(const primitive_inst&) const override { return true; } - static primitive_impl* create_data(const data_node& data, const kernel_impl_params&) { return new wait_for_events_impl(data); } + static primitive_impl* create_data(const data_node& data, std::shared_ptr) { return new wait_for_events_impl(data); } - static primitive_impl* create_input_layout(const input_layout_node& input, const kernel_impl_params&) { + static primitive_impl* create_input_layout(const input_layout_node& input, std::shared_ptr) { return new wait_for_events_impl(input); } - static primitive_impl* create_prior_box(const prior_box_node& prior_box, const kernel_impl_params&) { + static primitive_impl* create_prior_box(const prior_box_node& prior_box, std::shared_ptr) { // This primitive is being executed on CPU during network compilation. return new wait_for_events_impl(prior_box); } diff --git a/src/plugins/intel_gpu/src/graph/impls/cpu/detection_output.cpp b/src/plugins/intel_gpu/src/graph/impls/cpu/detection_output.cpp index 065308a46cefa7..c0fd99697e5907 100644 --- a/src/plugins/intel_gpu/src/graph/impls/cpu/detection_output.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/cpu/detection_output.cpp @@ -833,7 +833,7 @@ struct detection_output_impl : typed_primitive_impl { void init_kernels() override {} - static primitive_impl* create(const detection_output_node& arg, const kernel_impl_params&) { return new detection_output_impl(arg); } + static primitive_impl* create(const detection_output_node& arg, std::shared_ptr) { return new detection_output_impl(arg); } }; namespace detail { diff --git a/src/plugins/intel_gpu/src/graph/impls/cpu/non_max_suppression.cpp b/src/plugins/intel_gpu/src/graph/impls/cpu/non_max_suppression.cpp index 66bc18eefe7c5f..6aeecee9016eb5 100644 --- a/src/plugins/intel_gpu/src/graph/impls/cpu/non_max_suppression.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/cpu/non_max_suppression.cpp @@ -401,7 +401,7 @@ struct non_max_suppression_impl : typed_primitive_impl { return ev; } - static primitive_impl* create(const non_max_suppression_node&, const kernel_impl_params&) { + static primitive_impl* create(const non_max_suppression_node&, std::shared_ptr) { return new non_max_suppression_impl(); } void init_kernels() override {} diff --git a/src/plugins/intel_gpu/src/graph/impls/cpu/proposal.cpp b/src/plugins/intel_gpu/src/graph/impls/cpu/proposal.cpp index 3da173494d3cea..703018fef52c5a 100644 --- a/src/plugins/intel_gpu/src/graph/impls/cpu/proposal.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/cpu/proposal.cpp @@ -429,8 +429,8 @@ struct proposal_impl : typed_primitive_impl { void init_kernels() override {} - static primitive_impl* create(const proposal_node& arg, const kernel_impl_params& impl_param) { - const layout& l = impl_param.input_layouts[2]; + static primitive_impl* create(const proposal_node& arg, std::shared_ptr impl_param) { + const layout& l = impl_param->input_layouts[2]; const size_t count = l.feature() == 1 ? static_cast(l.batch()) : static_cast(l.feature()); // Supported image_info sizes and components meaning: diff --git a/src/plugins/intel_gpu/src/graph/impls/implementation_map.hpp b/src/plugins/intel_gpu/src/graph/impls/implementation_map.hpp index fcae102c3c17e1..cca382124b2a6b 100644 --- a/src/plugins/intel_gpu/src/graph/impls/implementation_map.hpp +++ b/src/plugins/intel_gpu/src/graph/impls/implementation_map.hpp @@ -154,11 +154,11 @@ class implementation_map { public: using key_builder = implementation_key; using key_type = typename key_builder::type; - using factory_type = std::function&, const kernel_impl_params&)>; + using factory_type = std::function&, std::shared_ptr)>; using map_type = singleton_map, factory_type>>; - static factory_type get(const kernel_impl_params& impl_param, impl_types preferred_impl_type) { - auto key = key_builder()(impl_param.input_layouts[0]); + static factory_type get(std::shared_ptr impl_param, impl_types preferred_impl_type) { + auto key = key_builder()(impl_param->input_layouts[0]); for (auto& kv : map_type::instance()) { impl_types impl_type = kv.first; if ((preferred_impl_type & impl_type) != impl_type) @@ -173,20 +173,20 @@ class implementation_map { target_impl_type_ss << preferred_impl_type; throw std::runtime_error(std::string("implementation_map for ") + typeid(primitive_kind).name() + " could not find any implementation to match key: " + - get_key_name(key) + ", impl_type: " + target_impl_type_ss.str() + ", node_id: " + impl_param.desc->id); + get_key_name(key) + ", impl_type: " + target_impl_type_ss.str() + ", node_id: " + impl_param->desc->id); } // check if for a given engine and type there exist an implementation - static bool check(const typed_program_node& primitive, const kernel_impl_params& impl_params) { + static bool check(const typed_program_node& primitive, std::shared_ptr impl_params) { impl_types target_impl_type = primitive.get_preferred_impl_type(); - auto key = key_builder()(impl_params.input_layouts[0]); + auto key = key_builder()(impl_params->input_layouts[0]); return check_key(target_impl_type, key); } // check if there exists a kernel implementation of a primitive with output set it primitive's output layout - static bool check_io_eq(const typed_program_node& primitive, const kernel_impl_params& impl_params) { + static bool check_io_eq(const typed_program_node& primitive, std::shared_ptr impl_params) { impl_types target_impl_type = primitive.get_preferred_impl_type(); - auto key = key_builder()(impl_params.output_layout); + auto key = key_builder()(impl_params->output_layout); return check_key(target_impl_type, key); } diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/activation.cpp b/src/plugins/intel_gpu/src/graph/impls/ocl/activation.cpp index d2467ca9c54f6e..f1f18152e1a066 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/activation.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/activation.cpp @@ -30,17 +30,17 @@ struct activation_impl : typed_primitive_impl_ocl { return args; } - static primitive_impl* create(const activation_node& arg, const kernel_impl_params& impl_param) { + static primitive_impl* create(const activation_node& arg, std::shared_ptr impl_param) { const auto& prim = arg.get_primitive(); - auto activation_params = get_default_params(impl_param); + auto activation_params = get_default_params(*impl_param); auto activation_optional_params = get_default_optional_params(arg.get_program()); convert_new_activation_func(prim, activation_params.activations); if (arg.is_parameterized()) { - const auto& slope_layout = impl_param.input_layouts[1]; - const auto& output_layout = impl_param.output_layout; + const auto& slope_layout = impl_param->input_layouts[1]; + const auto& output_layout = impl_param->output_layout; const auto params_num = kernel_selector::GetActivationAdditionalParamsNumber(activation_params.activations[0].function); diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/arg_max_min.cpp b/src/plugins/intel_gpu/src/graph/impls/ocl/arg_max_min.cpp index 1cba5f41087b38..641affe72ed2ec 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/arg_max_min.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/arg_max_min.cpp @@ -34,7 +34,7 @@ struct arg_max_min_impl : typed_primitive_impl_ocl { } public: - static primitive_impl* create(const arg_max_min_node& arg, const kernel_impl_params impl_param) { + static primitive_impl* create(const arg_max_min_node& arg, std::shared_ptr impl_param) { const auto& primitive = arg.get_primitive(); const auto& axis = primitive->axis; const auto& top_k = primitive->top_k; @@ -44,7 +44,7 @@ struct arg_max_min_impl : typed_primitive_impl_ocl { const auto& values_first = primitive->values_first; const auto& outputs_num = primitive->input.size() == 3 ? 2 : 1; // second output passed as input for TOP_K layer - auto argm_params = get_default_params(impl_param); + auto argm_params = get_default_params(*impl_param); auto argm_optional_params = get_default_optional_params(arg.get_program()); @@ -83,7 +83,7 @@ struct arg_max_min_impl : typed_primitive_impl_ocl { argm_params.argMaxMinSortType = kernel_selector::argm_sort::INDEX; if (outputs_num == 2) { - argm_params.inputs.push_back(convert_data_tensor(impl_param.input_layouts[2])); + argm_params.inputs.push_back(convert_data_tensor(impl_param->input_layouts[2])); } argm_params.values_first = values_first; diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/average_unpooling.cpp b/src/plugins/intel_gpu/src/graph/impls/ocl/average_unpooling.cpp index 6683701a68db45..4d9787057f85e8 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/average_unpooling.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/average_unpooling.cpp @@ -28,9 +28,9 @@ struct average_unpooling_impl : typed_primitive_impl_ocl { } public: - static primitive_impl* create(const average_unpooling_node& arg, const kernel_impl_params& impl_param) { + static primitive_impl* create(const average_unpooling_node& arg, std::shared_ptr impl_param) { auto primitive = arg.get_primitive(); - auto average_unpooling_params = get_default_params(impl_param); + auto average_unpooling_params = get_default_params(*impl_param); auto average_unpooling_optional_params = get_default_optional_params(arg.get_program()); auto& params = average_unpooling_params; diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/batch_to_space.cpp b/src/plugins/intel_gpu/src/graph/impls/ocl/batch_to_space.cpp index 8f499a81ee50dc..3b086d0593bba2 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/batch_to_space.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/batch_to_space.cpp @@ -25,9 +25,9 @@ struct batch_to_space_impl : typed_primitive_impl_ocl { } public: - static primitive_impl* create(const batch_to_space_node& arg, const kernel_impl_params& impl_param) { + static primitive_impl* create(const batch_to_space_node& arg, std::shared_ptr impl_param) { auto primitive = arg.get_primitive(); - auto batch_to_space_params = get_default_params(impl_param); + auto batch_to_space_params = get_default_params(*impl_param); auto batch_to_space_optional_params = get_default_optional_params(arg.get_program()); diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/binary_convolution.cpp b/src/plugins/intel_gpu/src/graph/impls/ocl/binary_convolution.cpp index 9c3a6557892e78..b5c73876a571fe 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/binary_convolution.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/binary_convolution.cpp @@ -60,9 +60,9 @@ struct binary_convolution_impl : typed_primitive_impl_ocl { int32_t get_split() const override { return _outer.get_split(); } public: - static primitive_impl* create(const binary_convolution_node& arg, const kernel_impl_params impl_param) { + static primitive_impl* create(const binary_convolution_node& arg, std::shared_ptr impl_param) { const auto& primitive = arg.get_primitive(); - const auto& weights_layout = impl_param.weights_layout.convert_to_weights_layout(false); + const auto& weights_layout = impl_param->weights_layout.convert_to_weights_layout(false); const auto& weights_size = weights_layout.size; const auto& split = primitive->split(); @@ -74,9 +74,9 @@ struct binary_convolution_impl : typed_primitive_impl_ocl { const auto depthwise_separable_opt = arg.get_depthwise_sep_opt(); const auto actual_split = depthwise_separable_opt ? (decltype(split))1 : split; - assert(impl_param.output_layout.feature() / primitive->split() == weights_layout.batch()); + assert(impl_param->output_layout.feature() / primitive->split() == weights_layout.batch()); - auto conv_params = get_weights_bias_default_params(impl_param, actual_split); + auto conv_params = get_weights_bias_default_params(*impl_param, actual_split); auto conv_optional_params = get_default_weights_bias_optional_params( arg.get_program()); diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/border.cpp b/src/plugins/intel_gpu/src/graph/impls/ocl/border.cpp index 68afc7f3aafc19..b3ee4358dbeb34 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/border.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/border.cpp @@ -22,10 +22,10 @@ struct border_impl : typed_primitive_impl_ocl { return make_unique(*this); } - static primitive_impl* create(const border_node& arg, const kernel_impl_params& impl_param) { + static primitive_impl* create(const border_node& arg, std::shared_ptr impl_param) { auto desc = arg.get_primitive(); - auto b_params = get_default_params(impl_param, 1); + auto b_params = get_default_params(*impl_param, 1); auto b_optional_params = get_default_optional_params(arg.get_program()); diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/broadcast.cpp b/src/plugins/intel_gpu/src/graph/impls/ocl/broadcast.cpp index a086bae3aff1f0..9961c5a81a8dea 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/broadcast.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/broadcast.cpp @@ -22,13 +22,13 @@ struct broadcast_impl : typed_primitive_impl_ocl { return make_unique(*this); } - static primitive_impl* create(const broadcast_node& arg, const kernel_impl_params& impl_param) { + static primitive_impl* create(const broadcast_node& arg, std::shared_ptr impl_param) { const auto& primitive = arg.get_primitive(); - auto bc_params = get_default_params(impl_param, 1); + auto bc_params = get_default_params(*impl_param, 1); auto bc_optional_params = get_default_optional_params(arg.get_program()); - const auto format = impl_param.output_layout.format; + const auto format = impl_param->output_layout.format; size_t max_axes_num = format.dimension(); const auto& broadcast_axes = primitive->broadcast_axes; diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/concatenation.cpp b/src/plugins/intel_gpu/src/graph/impls/ocl/concatenation.cpp index 185a156390a283..645ee08f1830ab 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/concatenation.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/concatenation.cpp @@ -69,22 +69,22 @@ struct concatenation_impl : typed_primitive_impl_ocl { } public: - static primitive_impl* create(const concatenation_node& arg, const kernel_impl_params& impl_param) { + static primitive_impl* create(const concatenation_node& arg, std::shared_ptr impl_param) { if (arg.can_be_optimized()) { return new concatenation_impl(arg, {}); } const auto& primitive = arg.get_primitive(); - auto concat_params = get_default_params(impl_param); + auto concat_params = get_default_params(*impl_param); auto concat_optional_params = get_default_optional_params(arg.get_program()); auto axis = primitive->axis; concat_params.inputs.resize(arg.inputs_count()); for (size_t i = 0; i < arg.inputs_count(); ++i) { - const layout& input_layout = impl_param.input_layouts[i]; + const layout& input_layout = impl_param->input_layouts[i]; concat_params.inputs[i] = convert_data_tensor(input_layout); } - concat_params.axis = convert_axis(axis, impl_param.output_layout.get_rank()); + concat_params.axis = convert_axis(axis, impl_param->output_layout.get_rank()); concat_optional_params.kernelPerInput = true; auto& kernel_selector = kernel_selector::concatenation_kernel_selector::Instance(); diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/convert_color.cpp b/src/plugins/intel_gpu/src/graph/impls/ocl/convert_color.cpp index 75cffe426896d6..133c8ec9654326 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/convert_color.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/convert_color.cpp @@ -31,15 +31,15 @@ struct convert_color_impl : typed_primitive_impl_ocl { } public: - static primitive_impl* create(const convert_color_node& arg, const kernel_impl_params& impl_param) { + static primitive_impl* create(const convert_color_node& arg, std::shared_ptr impl_param) { auto primitive = arg.get_primitive(); - auto convert_color_params = get_default_params(impl_param); + auto convert_color_params = get_default_params(*impl_param); auto convert_color_optional_params = get_default_optional_params(arg.get_program()); - for (size_t i = 1; i < impl_param.input_layouts.size(); ++i) { - convert_color_params.inputs.push_back(convert_data_tensor(impl_param.input_layouts[i])); + for (size_t i = 1; i < impl_param->input_layouts.size(); ++i) { + convert_color_params.inputs.push_back(convert_data_tensor(impl_param->input_layouts[i])); } convert_color_params.input_color_format = static_cast(primitive->input_color_format); diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/convolution.cpp b/src/plugins/intel_gpu/src/graph/impls/ocl/convolution.cpp index 881b655a62dabf..9fc27bc70049fc 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/convolution.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/convolution.cpp @@ -60,7 +60,7 @@ struct convolution_impl : typed_primitive_impl_ocl { bool get_depthwise_sep_opt() const override { return _outer.get_depthwise_sep_opt(); } public: - static primitive_impl* create(const convolution_node& arg, const kernel_impl_params& impl_param) { + static primitive_impl* create(const convolution_node& arg, std::shared_ptr impl_param) { const auto& primitive = arg.get_primitive(); const auto &split = primitive->split(); @@ -72,15 +72,15 @@ struct convolution_impl : typed_primitive_impl_ocl { const auto transposed = arg.get_transposed(); auto conv_params = get_weight_bias_zero_point_default_params( - impl_param, split, 1, primitive->grouped_weights_shape); + *impl_param, split, 1, primitive->grouped_weights_shape); auto conv_optional_params = get_default_weights_bias_optional_params(arg.get_program()); if (primitive->deformable_mode) { - conv_params.inputs.push_back(convert_data_tensor(impl_param.input_layouts[1])); + conv_params.inputs.push_back(convert_data_tensor(impl_param->input_layouts[1])); conv_params.deformable_mode = true; if (primitive->input.size() == 3) { - conv_params.inputs.push_back(convert_data_tensor(impl_param.input_layouts[2])); + conv_params.inputs.push_back(convert_data_tensor(impl_param->input_layouts[2])); conv_params.deformable_mask_enabled = true; } conv_params.bilinear_interpolation_pad = arg.bilinear_interpolation_pad(); @@ -92,7 +92,7 @@ struct convolution_impl : typed_primitive_impl_ocl { conv_params.split = split; conv_params.groups = groups; - const auto& weights_layout = impl_param.input_layouts[1 + 0 + arg.get_deform_conv_dep_offset()] + const auto& weights_layout = impl_param->input_layouts[1 + 0 + arg.get_deform_conv_dep_offset()] .convert_to_weights_layout(primitive->grouped_weights_shape); uint32_t kx = weights_layout.spatial(0); uint32_t ky = weights_layout.spatial(1); @@ -114,9 +114,9 @@ struct convolution_impl : typed_primitive_impl_ocl { uint32_t dilation_x = dilation.size() >= 1 ? dilation[dilation.size() - 1] : 1; conv_params.dilation = {dilation_x, dilation_y, dilation_z}; - if ((impl_param.input_layouts[0].data_type == data_types::u8 || - impl_param.input_layouts[0].data_type == data_types::i8) && - impl_param.input_layouts[1].data_type == data_types::i8) { + if ((impl_param->input_layouts[0].data_type == data_types::u8 || + impl_param->input_layouts[0].data_type == data_types::i8) && + impl_param->input_layouts[1].data_type == data_types::i8) { if (!primitive->weights_zero_points.empty() && !primitive->activations_zero_points.empty()) { conv_params.quantization = kernel_selector::QuantizationType::ASYMMETRIC_DATA_AND_WEIGHTS; } else if (!primitive->weights_zero_points.empty()) { @@ -130,7 +130,7 @@ struct convolution_impl : typed_primitive_impl_ocl { conv_params.quantization = kernel_selector::QuantizationType::NONE; } - auto format = impl_param.output_layout.format; + auto format = impl_param->output_layout.format; if (format == format::b_fs_zyx_fsv16 || format == format::bs_fs_zyx_bsv16_fsv16 || format == format::bs_fs_yx_bsv16_fsv16 || diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/crop.cpp b/src/plugins/intel_gpu/src/graph/impls/ocl/crop.cpp index 1b30f80bd09d93..deb8fb573142c1 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/crop.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/crop.cpp @@ -27,16 +27,16 @@ struct crop_impl : typed_primitive_impl_ocl { } public: - static primitive_impl* create(const crop_node& arg, const kernel_impl_params& impl_param) { + static primitive_impl* create(const crop_node& arg, std::shared_ptr impl_param) { const auto& primitive = arg.get_primitive(); - auto ew_params = get_default_params(impl_param, 1); + auto ew_params = get_default_params(*impl_param, 1); auto ew_optional_params = get_default_optional_params(arg.get_program()); ew_params.operations.push_back( {{kernel_selector::eltwise_params::InputType::Buffer(0)}, kernel_selector::eltwise_mode::ASSIGN}); - const auto& input_layout = impl_param.input_layouts[0]; + const auto& input_layout = impl_param->input_layouts[0]; ew_params.inputs[0] = convert_data_tensor(input_layout, 1, primitive->offsets); auto& kernel_selector = kernel_selector::eltwise_kernel_selector::Instance(); diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/ctc_greedy_decoder.cpp b/src/plugins/intel_gpu/src/graph/impls/ocl/ctc_greedy_decoder.cpp index 41ec3b01838533..3fbd097019faf6 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/ctc_greedy_decoder.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/ctc_greedy_decoder.cpp @@ -26,19 +26,19 @@ struct ctc_greedy_decoder_impl : typed_primitive_impl_ocl { } public: - static primitive_impl* create(const ctc_greedy_decoder_node& arg, const kernel_impl_params& impl_param) { + static primitive_impl* create(const ctc_greedy_decoder_node& arg, std::shared_ptr impl_param) { auto prim = arg.get_primitive(); - auto ctc_gd_params = get_default_params(impl_param); + auto ctc_gd_params = get_default_params(*impl_param); auto ctc_gd_optional_params = get_default_optional_params(arg.get_program()); - ctc_gd_params.inputs.push_back(convert_data_tensor(impl_param.input_layouts[1])); + ctc_gd_params.inputs.push_back(convert_data_tensor(impl_param->input_layouts[1])); ctc_gd_params.merge_repeated = prim->ctc_merge_repeated; ctc_gd_params.blank_index = prim->blank_index; ctc_gd_params.outputs_num = arg.has_second_output() ? 2 : 1; if (ctc_gd_params.outputs_num == 2) { - const auto& second_output_layout = impl_param.input_layouts[1]; + const auto& second_output_layout = impl_param->input_layouts[1]; ctc_gd_params.inputs.push_back(convert_data_tensor(second_output_layout)); } diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/cum_sum.cpp b/src/plugins/intel_gpu/src/graph/impls/ocl/cum_sum.cpp index 5d4b16edc0d984..fa855a3f1c2d27 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/cum_sum.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/cum_sum.cpp @@ -45,10 +45,10 @@ struct cum_sum_impl : typed_primitive_impl_ocl { } public: - static primitive_impl* create(const cum_sum_node& arg, const kernel_impl_params& impl_param) { + static primitive_impl* create(const cum_sum_node& arg, std::shared_ptr impl_param) { const auto& prim = arg.get_primitive(); - auto cum_sum_params = get_default_params(impl_param); + auto cum_sum_params = get_default_params(*impl_param); auto cum_sum_optional_params = get_default_optional_params(arg.get_program()); diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/custom_primitive.cpp b/src/plugins/intel_gpu/src/graph/impls/ocl/custom_primitive.cpp index 9b61055e3b814e..0dcfdd15a4814c 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/custom_primitive.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/custom_primitive.cpp @@ -204,14 +204,14 @@ static std::string get_jit_constant(const custom_gpu_primitive_node& outer, cons return oss.str(); } -static primitive_impl* create(const custom_gpu_primitive_node& arg, const kernel_impl_params& impl_param) { +static primitive_impl* create(const custom_gpu_primitive_node& arg, std::shared_ptr impl_param) { const auto primitive = arg.get_primitive().get(); auto cl_kernel = std::make_shared(); cl_kernel->code.kernelString = std::make_shared(); cl_kernel->code.kernelString->entry_point = primitive->kernel_entry_point; cl_kernel->code.kernelString->options = primitive->build_options; - cl_kernel->code.kernelString->jit = get_jit_constant(arg, impl_param); + cl_kernel->code.kernelString->jit = get_jit_constant(arg, *impl_param); for (const auto& s : primitive->kernels_code) { cl_kernel->code.kernelString->str += s + "\n"; } diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/deconvolution.cpp b/src/plugins/intel_gpu/src/graph/impls/ocl/deconvolution.cpp index 64f2c4d72cef7b..b76b19aeed9ee1 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/deconvolution.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/deconvolution.cpp @@ -51,14 +51,14 @@ struct deconvolution_impl : typed_primitive_impl_ocl { uint32_t get_groups() const override { return _outer.get_groups(); } public: - static primitive_impl* create(const deconvolution_node& arg, const kernel_impl_params& impl_param) { + static primitive_impl* create(const deconvolution_node& arg, std::shared_ptr impl_param) { const auto& primitive = arg.get_primitive(); const auto& split = primitive->split(); const auto& stride = primitive->stride; #if 0 // TODO: support dilation const auto& dilation = primitive->dilation; #else - const ov::Strides dilation(impl_param.output_layout.get_spatial_rank(), 1); + const ov::Strides dilation(impl_param->output_layout.get_spatial_rank(), 1); #endif const auto actual_split = split; @@ -66,7 +66,7 @@ struct deconvolution_impl : typed_primitive_impl_ocl { const auto& groups = primitive->groups; auto deconv_params = get_weights_bias_default_params( - impl_param, + *impl_param, (groups > 1) ? 1 : actual_split, 1, primitive->grouped_weights_shape); @@ -77,7 +77,7 @@ struct deconvolution_impl : typed_primitive_impl_ocl { deconv_params.groups = groups; const auto weights_idx = 1 + 0; - const auto& weights_layout = impl_param.input_layouts[weights_idx].convert_to_weights_layout(primitive->grouped_weights_shape); + const auto& weights_layout = impl_param->input_layouts[weights_idx].convert_to_weights_layout(primitive->grouped_weights_shape); uint32_t kx = weights_layout.spatial(0); uint32_t ky = weights_layout.spatial(1); uint32_t kz = weights_layout.spatial(2); diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/deformable_convolution.cpp b/src/plugins/intel_gpu/src/graph/impls/ocl/deformable_convolution.cpp index a7be9bed1a7111..c3024bf04c3f4a 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/deformable_convolution.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/deformable_convolution.cpp @@ -37,7 +37,7 @@ struct deformable_conv_impl : typed_primitive_impl_ocl { uint32_t get_groups() const override { return _outer.get_groups(); } public: - static primitive_impl* create(const deformable_conv_node& arg, const kernel_impl_params& impl_param) { + static primitive_impl* create(const deformable_conv_node& arg, std::shared_ptr impl_param) { const auto& primitive = arg.get_primitive(); const auto& split = primitive->split(); const auto& groups = primitive->groups; @@ -46,14 +46,14 @@ struct deformable_conv_impl : typed_primitive_impl_ocl { const auto actual_split = depthwise_separable_opt ? (decltype(split))1 : split; auto conv_params = get_weights_bias_default_params( - impl_param, + *impl_param, (groups > 1 && !depthwise_separable_opt) ? groups : actual_split, groups); auto conv_optional_params = get_default_weights_bias_optional_params(arg.get_program()); const auto weight_idx = 1 + 0; - const auto& weights_layout = impl_param.input_layouts[weight_idx].convert_to_weights_layout(false); + const auto& weights_layout = impl_param->input_layouts[weight_idx].convert_to_weights_layout(false); const auto& weights_size = weights_layout.size; conv_params.depthwise_separable_opt = depthwise_separable_opt; @@ -92,12 +92,12 @@ struct deformable_interp_impl : typed_primitive_impl_ocl { uint32_t get_groups() const override { return 1; } public: - static primitive_impl* create(const deformable_interp_node& arg, const kernel_impl_params& impl_param) { + static primitive_impl* create(const deformable_interp_node& arg, std::shared_ptr impl_param) { const auto input_idx = 0; const auto trans_idx = 1; const auto mask_idx = 2; const auto& primitive = arg.get_primitive(); - const auto& input_layout = impl_param.input_layouts[input_idx]; + const auto& input_layout = impl_param->input_layouts[input_idx]; const auto& kernel_size = primitive->kernel_size; auto stride = primitive->stride; @@ -106,7 +106,7 @@ struct deformable_interp_impl : typed_primitive_impl_ocl { const auto& groups = primitive->groups; const auto& deformable_groups = primitive->deformable_groups; - auto conv_params = get_default_params(impl_param, groups); + auto conv_params = get_default_params(*impl_param, groups); auto conv_optional_params = get_default_optional_params(arg.get_program()); @@ -114,9 +114,9 @@ struct deformable_interp_impl : typed_primitive_impl_ocl { auto weights_layout = layout(input_layout.data_type, input_layout.format, kernel_size); conv_params.weights = convert_weights_tensor(weights_layout); - conv_params.inputs.push_back(convert_data_tensor(impl_param.input_layouts[trans_idx])); + conv_params.inputs.push_back(convert_data_tensor(impl_param->input_layouts[trans_idx])); if (primitive->input.size() == 3) { - conv_params.inputs.push_back(convert_data_tensor(impl_param.input_layouts[mask_idx])); + conv_params.inputs.push_back(convert_data_tensor(impl_param->input_layouts[mask_idx])); conv_params.deformable_mask_enabled = true; } conv_params.bilinear_interpolation_pad = primitive->bilinear_interpolation_pad; diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/depth_to_space.cpp b/src/plugins/intel_gpu/src/graph/impls/ocl/depth_to_space.cpp index 532a224285ee2b..c86db2ac2842aa 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/depth_to_space.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/depth_to_space.cpp @@ -24,10 +24,10 @@ struct depth_to_space_impl : typed_primitive_impl_ocl { } public: - static primitive_impl* create(const depth_to_space_node& arg, const kernel_impl_params& impl_param) { + static primitive_impl* create(const depth_to_space_node& arg, std::shared_ptr impl_param) { const auto& prim = arg.get_primitive(); - auto depth_to_space_params = get_default_params(impl_param); + auto depth_to_space_params = get_default_params(*impl_param); auto depth_to_space_optional_params = get_default_optional_params(arg.get_program()); diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/detection_output.cpp b/src/plugins/intel_gpu/src/graph/impls/ocl/detection_output.cpp index fb1c9a41a8c9ec..ec14a098eeda9b 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/detection_output.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/detection_output.cpp @@ -51,15 +51,15 @@ struct detection_output_impl : typed_primitive_impl_ocl { } public: - static primitive_impl* create(const detection_output_node& arg, const kernel_impl_params& impl_param) { - auto detect_out_params = get_default_params(impl_param); + static primitive_impl* create(const detection_output_node& arg, std::shared_ptr impl_param) { + auto detect_out_params = get_default_params(*impl_param); auto detect_out_optional_params = get_default_optional_params(arg.get_program()); const auto confidence_idx = 1; const auto prior_box_idx = 2; - detect_out_params.inputs.push_back(convert_data_tensor(impl_param.input_layouts[confidence_idx])); - detect_out_params.inputs.push_back(convert_data_tensor(impl_param.input_layouts[prior_box_idx])); + detect_out_params.inputs.push_back(convert_data_tensor(impl_param->input_layouts[confidence_idx])); + detect_out_params.inputs.push_back(convert_data_tensor(impl_param->input_layouts[prior_box_idx])); set_detection_output_specific_params(detect_out_params.detectOutParams, arg); auto& kernel_selector = kernel_selector::detection_output_kernel_selector::Instance(); diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/eltwise.cpp b/src/plugins/intel_gpu/src/graph/impls/ocl/eltwise.cpp index 6abdbcfdb5dad9..2aaeff0758ce03 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/eltwise.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/eltwise.cpp @@ -29,15 +29,15 @@ struct eltwise_impl : typed_primitive_impl_ocl { } public: - static primitive_impl* create(const eltwise_node& arg, const kernel_impl_params& impl_param) { + static primitive_impl* create(const eltwise_node& arg, std::shared_ptr impl_param) { const auto& primitive = arg.get_primitive(); - auto ew_params = get_default_params(impl_param); + auto ew_params = get_default_params(*impl_param); auto ew_optional_params = get_default_optional_params(arg.get_program()); for (size_t i = 1; i < arg.inputs_count(); i++) { - ew_params.inputs.push_back(convert_data_tensor(impl_param.input_layouts[i])); + ew_params.inputs.push_back(convert_data_tensor(impl_param->input_layouts[i])); } @@ -57,8 +57,8 @@ struct eltwise_impl : typed_primitive_impl_ocl { for (size_t i = 0; i < ew_params.inputs.size(); i++) { if (!ew_params.inputs[i].SameDims(ew_params.outputs[0])) { - std::vector input_size = impl_param.input_layouts[i].size.raw.vector(); - std::vector output_size = impl_param.output_layout.size.raw.vector(); + std::vector input_size = impl_param->input_layouts[i].size.raw.vector(); + std::vector output_size = impl_param->output_layout.size.raw.vector(); bool broadcast = false; for (size_t d = 0; d < output_size.size(); d++) { if (output_size[d] != 1 && input_size[d] == 1) @@ -99,8 +99,8 @@ struct eltwise_impl : typed_primitive_impl_ocl { // TODO [LOW PRECISION]: check if this parameter's really needed. Maybe data types are enough bool quantization = true; for (size_t i = 0; i < arg.inputs_count(); i++) { - if (impl_param.input_layouts[i].data_type != data_types::u8 && - impl_param.input_layouts[i].data_type != data_types::i8) { + if (impl_param->input_layouts[i].data_type != data_types::u8 && + impl_param->input_layouts[i].data_type != data_types::i8) { quantization = false; } } diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/embedding_bag.cpp b/src/plugins/intel_gpu/src/graph/impls/ocl/embedding_bag.cpp index 68efe7ca8d195c..61a09629391c12 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/embedding_bag.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/embedding_bag.cpp @@ -24,9 +24,9 @@ struct embedding_bag_impl : typed_primitive_impl_ocl { } public: - static primitive_impl* create(const embedding_bag_node& arg, const kernel_impl_params& impl_param) { + static primitive_impl* create(const embedding_bag_node& arg, std::shared_ptr impl_param) { const auto& primitive = arg.get_primitive(); - auto embedding_bag_params = get_default_params(impl_param); + auto embedding_bag_params = get_default_params(*impl_param); auto embedding_bag_optional_params = get_default_optional_params(arg.get_program()); @@ -46,7 +46,7 @@ struct embedding_bag_impl : typed_primitive_impl_ocl { } for (size_t i = 1; i < arg.inputs_count(); i++) { - embedding_bag_params.inputs.push_back(convert_data_tensor(impl_param.input_layouts[i])); + embedding_bag_params.inputs.push_back(convert_data_tensor(impl_param->input_layouts[i])); } embedding_bag_params.default_index = arg.get_primitive()->default_index; diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/experimental_detectron_roi_feature_extractor.cpp b/src/plugins/intel_gpu/src/graph/impls/ocl/experimental_detectron_roi_feature_extractor.cpp index 774710d9c35e8c..4ba3b50a89c107 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/experimental_detectron_roi_feature_extractor.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/experimental_detectron_roi_feature_extractor.cpp @@ -39,9 +39,9 @@ struct experimental_detectron_roi_feature_extractor_impl : public typed_primitiv } public: - static primitive_impl* create(const experimental_detectron_roi_feature_extractor_node& arg, const kernel_impl_params& impl_param) { + static primitive_impl* create(const experimental_detectron_roi_feature_extractor_node& arg, std::shared_ptr impl_param) { const auto& primitive = arg.get_primitive(); - const auto output_layout = impl_param.output_layout; + const auto output_layout = impl_param->output_layout; const auto padding_filling_value = output_layout.data_padding.filling_value(); CLDNN_ERROR_NOT_EQUAL(arg.id(), "experimental_detectron_roi_feature_extractor padding filling value", @@ -49,12 +49,12 @@ struct experimental_detectron_roi_feature_extractor_impl : public typed_primitiv "padding mode", 0.0f, "Unknown padding mode in experimental_detectron_roi_feature_extractor."); - auto params = get_default_params(impl_param); + auto params = get_default_params(*impl_param); auto optional_params = get_default_optional_params(arg.get_program()); size_t number_of_inputs = primitive->input_size() - 1; for (std::size_t i = 1; i < number_of_inputs; i++) { - params.inputs.push_back(convert_data_tensor(impl_param.input_layouts[i])); + params.inputs.push_back(convert_data_tensor(impl_param->input_layouts[i])); } params.output_dim = primitive->output_dim; diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/experimental_detectron_topk_rois.cpp b/src/plugins/intel_gpu/src/graph/impls/ocl/experimental_detectron_topk_rois.cpp index ae445d83b036fe..97589c7e53b6ab 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/experimental_detectron_topk_rois.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/experimental_detectron_topk_rois.cpp @@ -21,12 +21,12 @@ struct experimental_detectron_topk_rois_impl : typed_primitive_impl_ocl(*this); } - static primitive_impl *create(const experimental_detectron_topk_rois_node &arg, const kernel_impl_params& impl_param) { + static primitive_impl *create(const experimental_detectron_topk_rois_node &arg, std::shared_ptr impl_param) { const auto& primitive = arg.get_primitive(); - auto params = get_default_params(impl_param); + auto params = get_default_params(*impl_param); const auto& experimental_detectron_topk_rois_kernel_selector = kernel_selector::experimental_detectron_topk_rois_kernel_selector::Instance(); - params.inputs.push_back(convert_data_tensor(impl_param.input_layouts[1])); + params.inputs.push_back(convert_data_tensor(impl_param->input_layouts[1])); params.max_rois = primitive->max_rois; auto best_kernels = experimental_detectron_topk_rois_kernel_selector.GetBestKernels(params, kernel_selector::experimental_detectron_topk_roi_optional_params()); diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/extract_image_patches.cpp b/src/plugins/intel_gpu/src/graph/impls/ocl/extract_image_patches.cpp index 93b2033f338caf..33131d073c548b 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/extract_image_patches.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/extract_image_patches.cpp @@ -23,9 +23,9 @@ struct extract_image_patches_impl : typed_primitive_impl_ocl impl_param) { const auto& prim = arg.get_primitive(); - auto params = get_default_params(impl_param); + auto params = get_default_params(*impl_param); auto optional_params = get_default_optional_params(arg.get_program()); diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/fully_connected.cpp b/src/plugins/intel_gpu/src/graph/impls/ocl/fully_connected.cpp index e6783ec4df77cc..36ae094934063f 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/fully_connected.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/fully_connected.cpp @@ -40,9 +40,9 @@ struct fully_connected_impl : typed_primitive_impl_ocl { } public: - static primitive_impl* create(const fully_connected_node& arg, const kernel_impl_params& impl_param) { + static primitive_impl* create(const fully_connected_node& arg, std::shared_ptr impl_param) { const auto primitive = arg.get_primitive(); - auto fc_params = get_weights_bias_default_params(impl_param); + auto fc_params = get_weights_bias_default_params(*impl_param); auto fc_optional_params = get_default_weights_bias_optional_params( arg.get_program()); @@ -52,7 +52,7 @@ struct fully_connected_impl : typed_primitive_impl_ocl { fc_params.outputs = { fc_params.outputs[0].FlattenFeatureAndSpatials() }; bool is_quantized = true; - for (auto& input : impl_param.input_layouts) + for (auto& input : impl_param->input_layouts) is_quantized &= data_type_traits::is_quantized(input.data_type); if (is_quantized) { diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/gather.cpp b/src/plugins/intel_gpu/src/graph/impls/ocl/gather.cpp index 74312f9644669e..434724d7b5338a 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/gather.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/gather.cpp @@ -68,18 +68,18 @@ struct gather_impl : typed_primitive_impl_ocl { } public: - static primitive_impl* create(const gather_node& arg, const kernel_impl_params& impl_param) { + static primitive_impl* create(const gather_node& arg, std::shared_ptr impl_param) { const auto& prim = arg.get_primitive(); - auto gather_params = get_default_params(impl_param); + auto gather_params = get_default_params(*impl_param); auto gather_optional_params = get_default_optional_params(arg.get_program()); - auto input_layout = impl_param.input_layouts[0]; + auto input_layout = impl_param->input_layouts[0]; gather_params.axis = convert_axis(prim->axis, input_layout.get_rank()); gather_params.batch_dim = size_t(prim->batch_dim); gather_params.support_neg_ind = prim->support_neg_ind; - gather_params.inputs.push_back(convert_data_tensor(impl_param.input_layouts[1])); + gather_params.inputs.push_back(convert_data_tensor(impl_param->input_layouts[1])); auto& kernel_selector = kernel_selector::gather_kernel_selector::Instance(); auto best_kernels = kernel_selector.GetBestKernels(gather_params, gather_optional_params); diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/gather_elements.cpp b/src/plugins/intel_gpu/src/graph/impls/ocl/gather_elements.cpp index 7c8a10bc22e35d..e4b45e6fac4210 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/gather_elements.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/gather_elements.cpp @@ -42,15 +42,15 @@ struct gather_elements_impl : typed_primitive_impl_ocl { } public: - static primitive_impl* create(const gather_elements_node& arg, const kernel_impl_params& impl_param) { + static primitive_impl* create(const gather_elements_node& arg, std::shared_ptr impl_param) { const auto& prim = arg.get_primitive(); - auto gather_elements_params = get_default_params(impl_param); + auto gather_elements_params = get_default_params(*impl_param); auto gather_elements_optional_params = get_default_optional_params(arg.get_program()); gather_elements_params.axis = convert_axis(prim->axis); - gather_elements_params.inputs.push_back(convert_data_tensor(impl_param.input_layouts[1])); + gather_elements_params.inputs.push_back(convert_data_tensor(impl_param->input_layouts[1])); auto& kernel_selector = kernel_selector::gather_elements_kernel_selector::Instance(); auto best_kernels = kernel_selector.GetBestKernels(gather_elements_params, gather_elements_optional_params); diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/gather_nd.cpp b/src/plugins/intel_gpu/src/graph/impls/ocl/gather_nd.cpp index 3c5a79e7c97c7b..03b8cfe03c83a7 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/gather_nd.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/gather_nd.cpp @@ -22,9 +22,9 @@ struct gather_nd_impl : typed_primitive_impl_ocl { return make_unique(*this); } - static primitive_impl* create(const gather_nd_node& arg, const kernel_impl_params& impl_param) { + static primitive_impl* create(const gather_nd_node& arg, std::shared_ptr impl_param) { const auto& prim = arg.get_primitive(); - auto gather_nd_params = get_default_params(impl_param); + auto gather_nd_params = get_default_params(*impl_param); auto gather_nd_optional_params = get_default_optional_params(arg.get_program()); @@ -32,7 +32,7 @@ struct gather_nd_impl : typed_primitive_impl_ocl { gather_nd_params.batch_dims = prim->batch_dims; gather_nd_params.batch_merged_output = prim->batch_merged_output; - gather_nd_params.inputs.push_back(convert_data_tensor(impl_param.input_layouts[1])); + gather_nd_params.inputs.push_back(convert_data_tensor(impl_param->input_layouts[1])); auto& kernel_selector = kernel_selector::gather_nd_kernel_selector::Instance(); auto best_kernels = kernel_selector.GetBestKernels(gather_nd_params, gather_nd_optional_params); diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/gather_tree.cpp b/src/plugins/intel_gpu/src/graph/impls/ocl/gather_tree.cpp index a94aae4b4e1e51..51c405a1939bb9 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/gather_tree.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/gather_tree.cpp @@ -22,13 +22,13 @@ struct gather_tree_impl : typed_primitive_impl_ocl { return make_unique(*this); } - static primitive_impl* create(const gather_tree_node& arg, const kernel_impl_params& impl_param) { + static primitive_impl* create(const gather_tree_node& arg, std::shared_ptr impl_param) { auto desc = arg.get_primitive(); - auto b_params = get_default_params(impl_param, 1); + auto b_params = get_default_params(*impl_param, 1); auto b_optional_params = get_default_optional_params(arg.get_program()); for (size_t i = 1; i < arg.get_dependencies().size(); i++) { - b_params.inputs.push_back(convert_data_tensor(impl_param.input_layouts[i], 1)); + b_params.inputs.push_back(convert_data_tensor(impl_param->input_layouts[i], 1)); } auto& kernel_selector = kernel_selector::gather_tree_kernel_selector::Instance(); diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/gemm.cpp b/src/plugins/intel_gpu/src/graph/impls/ocl/gemm.cpp index 657d802d0779bf..d5ff619b204bfe 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/gemm.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/gemm.cpp @@ -23,14 +23,14 @@ struct gemm_impl : typed_primitive_impl_ocl { } public: - static primitive_impl* create(const gemm_node& arg, const kernel_impl_params& impl_param) { + static primitive_impl* create(const gemm_node& arg, std::shared_ptr impl_param) { auto desc = arg.get_primitive(); - auto gemm_params = get_default_params(impl_param, 1); + auto gemm_params = get_default_params(*impl_param, 1); auto gemm_optional_params = get_default_optional_params(arg.get_program()); for (size_t i = 1; i < arg.inputs_count(); i++) { - gemm_params.inputs.push_back(convert_data_tensor(impl_param.input_layouts[i])); + gemm_params.inputs.push_back(convert_data_tensor(impl_param->input_layouts[i])); } gemm_params.alpha = desc->alpha; @@ -39,7 +39,7 @@ struct gemm_impl : typed_primitive_impl_ocl { gemm_params.transpose_input1 = desc->transpose_input1; bool is_quantized = true; - for (auto& input : impl_param.input_layouts) + for (auto& input : impl_param->input_layouts) is_quantized &= data_type_traits::is_quantized(input.data_type); if (is_quantized) { diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/generic_layer.cpp b/src/plugins/intel_gpu/src/graph/impls/ocl/generic_layer.cpp index d85bc6ebe1baec..c958be7780ee9b 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/generic_layer.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/generic_layer.cpp @@ -105,7 +105,7 @@ struct generic_layer_cpu : typed_primitive_impl { void init_kernels() override {} }; -static primitive_impl* create(const generic_layer_node& arg, const kernel_impl_params&) { +static primitive_impl* create(const generic_layer_node& arg, std::shared_ptr) { if (arg.get_primitive()->generic_params.engine == kernel_selector::generic_kernel_params::Engine::GPU) { return new generic_layer_impl(arg); } else { diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/grn.cpp b/src/plugins/intel_gpu/src/graph/impls/ocl/grn.cpp index 182869a8d57cfb..9f404ba258ed52 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/grn.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/grn.cpp @@ -26,9 +26,9 @@ struct grn_impl : typed_primitive_impl_ocl { } public: - static primitive_impl* create(const grn_node& arg, const kernel_impl_params& impl_param) { + static primitive_impl* create(const grn_node& arg, std::shared_ptr impl_param) { const auto& prim = arg.get_primitive(); - auto grn_params = get_default_params(impl_param); + auto grn_params = get_default_params(*impl_param); auto grn_optional_params = get_default_optional_params(arg.get_program()); grn_params.bias = prim->bias; diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/lrn.cpp b/src/plugins/intel_gpu/src/graph/impls/ocl/lrn.cpp index d7aa1cefbf13dc..959ffce8cc8049 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/lrn.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/lrn.cpp @@ -21,9 +21,9 @@ struct lrn_impl : typed_primitive_impl_ocl { return make_unique(*this); } - static primitive_impl* create(const lrn_node& arg, const kernel_impl_params& impl_param) { + static primitive_impl* create(const lrn_node& arg, std::shared_ptr impl_param) { const auto& primitive = arg.get_primitive(); - auto lrn_params = get_default_params(impl_param); + auto lrn_params = get_default_params(*impl_param); auto lrn_optional_params = get_default_optional_params(arg.get_program()); lrn_params.alpha = primitive->alpha; diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/lstm_dynamic_input.cpp b/src/plugins/intel_gpu/src/graph/impls/ocl/lstm_dynamic_input.cpp index 4546d7274f2f19..4a7b5da78eab64 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/lstm_dynamic_input.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/lstm_dynamic_input.cpp @@ -34,23 +34,23 @@ struct lstm_dynamic_input_impl : typed_primitive_impl_ocl { } public: - static primitive_impl* create(const lstm_dynamic_input_node& arg, const kernel_impl_params& impl_param) { - auto dlstm_input_params = get_default_params(impl_param); + static primitive_impl* create(const lstm_dynamic_input_node& arg, std::shared_ptr impl_param) { + auto dlstm_input_params = get_default_params(*impl_param); const auto dyn_len_idx = 1; const auto weights_idx = 2; const auto bias_idx = 3; - const auto& weights_layout = impl_param.input_layouts[weights_idx]; + const auto& weights_layout = impl_param->input_layouts[weights_idx]; dlstm_input_params.weights = convert_weights_tensor(weights_layout); if (arg.bias_term()) { - const auto& bias_layout = impl_param.input_layouts[bias_idx]; + const auto& bias_layout = impl_param->input_layouts[bias_idx]; dlstm_input_params.bias.push_back(convert_data_tensor(bias_layout)); } // dyn length - const auto& dyn_length_tensor = impl_param.input_layouts[dyn_len_idx]; + const auto& dyn_length_tensor = impl_param->input_layouts[dyn_len_idx]; dlstm_input_params.inputs.push_back(convert_data_tensor(dyn_length_tensor)); dlstm_input_params.direction = arg.direction(); diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/lstm_dynamic_timeloop.cpp b/src/plugins/intel_gpu/src/graph/impls/ocl/lstm_dynamic_timeloop.cpp index ecec3c48a93547..ac549b71ea0a7d 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/lstm_dynamic_timeloop.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/lstm_dynamic_timeloop.cpp @@ -39,36 +39,36 @@ struct lstm_dynamic_timeloop_impl : typed_primitive_impl_ocl(impl_param); + static primitive_impl* create(const lstm_dynamic_timeloop_node& arg, std::shared_ptr impl_param) { + auto dlstm_timeloop_params = get_default_params(*impl_param); // dyn length - const auto& dyn_length_tensor = impl_param.input_layouts[arg.get_dependency_idx("dyn_length")]; + const auto& dyn_length_tensor = impl_param->input_layouts[arg.get_dependency_idx("dyn_length")]; dlstm_timeloop_params.inputs.push_back(convert_data_tensor(dyn_length_tensor)); // recurrent - const auto& recurrent_layout = impl_param.input_layouts[arg.get_dependency_idx("recurrent")]; + const auto& recurrent_layout = impl_param->input_layouts[arg.get_dependency_idx("recurrent")]; dlstm_timeloop_params.recurrent = convert_data_tensor(recurrent_layout); dlstm_timeloop_params.direction = arg.direction(); if (arg.initial_cell_term()) { - const auto& cell_layout = impl_param.input_layouts[arg.get_dependency_idx("initial_cell")]; + const auto& cell_layout = impl_param->input_layouts[arg.get_dependency_idx("initial_cell")]; dlstm_timeloop_params.set_cell(convert_data_tensor(cell_layout)); } if (arg.last_hidden_output_term()) { - const auto& last_hidden_output_layout = impl_param.input_layouts[arg.get_dependency_idx("last_hidden_output")]; + const auto& last_hidden_output_layout = impl_param->input_layouts[arg.get_dependency_idx("last_hidden_output")]; dlstm_timeloop_params.set_last_hidden_output(convert_data_tensor(last_hidden_output_layout)); } if (arg.initial_hidden_term()) { - const auto& hidden_layout = impl_param.input_layouts[arg.get_dependency_idx("initial_hidden")]; + const auto& hidden_layout = impl_param->input_layouts[arg.get_dependency_idx("initial_hidden")]; dlstm_timeloop_params.set_hidden(convert_data_tensor(hidden_layout)); } if (arg.last_cell_output_term()) { - const auto& last_cell_state_layout = impl_param.input_layouts[arg.get_dependency_idx("last_cell_output")]; + const auto& last_cell_state_layout = impl_param->input_layouts[arg.get_dependency_idx("last_cell_output")]; dlstm_timeloop_params.set_last_cell_output(convert_data_tensor(last_cell_state_layout)); } diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/lstm_elt.cpp b/src/plugins/intel_gpu/src/graph/impls/ocl/lstm_elt.cpp index d59c34d55658ab..0978e7363e839f 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/lstm_elt.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/lstm_elt.cpp @@ -34,15 +34,15 @@ struct lstm_elt_impl : typed_primitive_impl_ocl { } public: - static primitive_impl* create(const lstm_elt_node& arg, const kernel_impl_params& impl_param) { + static primitive_impl* create(const lstm_elt_node& arg, std::shared_ptr impl_param) { const auto& prim = arg.get_primitive(); - auto lstm_elt_params = get_default_params(impl_param); + auto lstm_elt_params = get_default_params(*impl_param); auto lstm_elt_optional_params = get_default_optional_params(arg.get_program()); if (arg.cell_term()) { const auto& cell_idx = 1; - const auto& cell_layout = impl_param.input_layouts[cell_idx]; + const auto& cell_layout = impl_param->input_layouts[cell_idx]; lstm_elt_params.SetCell(convert_data_tensor(cell_layout)); // TODO: make a generic function to get the direction if (cell_layout.spatial(1) > 1) { diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/lstm_gemm.cpp b/src/plugins/intel_gpu/src/graph/impls/ocl/lstm_gemm.cpp index 12f8aea5e5a334..35041425fc1c32 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/lstm_gemm.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/lstm_gemm.cpp @@ -37,26 +37,26 @@ struct lstm_gemm_impl : typed_primitive_impl_ocl { } public: - static primitive_impl* create(const lstm_gemm_node& arg, const kernel_impl_params& impl_param) { + static primitive_impl* create(const lstm_gemm_node& arg, std::shared_ptr impl_param) { const auto input_idx = 0; const auto weight_idx = 1; const auto recurrent_idx = 2; const auto bias_idx = 3; const auto hidden_idx = arg.bias_term() ? 4 : 3; - const auto& weights_layout = impl_param.input_layouts[weight_idx]; - auto lstm_gemm_params = get_default_params(impl_param); + const auto& weights_layout = impl_param->input_layouts[weight_idx]; + auto lstm_gemm_params = get_default_params(*impl_param); lstm_gemm_params.weights = convert_data_tensor(weights_layout); if (arg.bias_term()) { - const auto& bias_layout = impl_param.input_layouts[bias_idx]; + const auto& bias_layout = impl_param->input_layouts[bias_idx]; lstm_gemm_params.SetBias(convert_data_tensor(bias_layout)); } if (arg.hidden_term()) { - const auto& recurrent_layout = impl_param.input_layouts[recurrent_idx]; + const auto& recurrent_layout = impl_param->input_layouts[recurrent_idx]; lstm_gemm_params.recurrent = convert_data_tensor(recurrent_layout); - const auto& hidden_layout = impl_param.input_layouts[hidden_idx]; + const auto& hidden_layout = impl_param->input_layouts[hidden_idx]; lstm_gemm_params.SetHidden(convert_data_tensor(hidden_layout)); // TODO: make a generic function to get the direction if (hidden_layout.spatial(1) > 1) { @@ -66,7 +66,7 @@ struct lstm_gemm_impl : typed_primitive_impl_ocl { lstm_gemm_params.direction = arg.direction(); // Update the direction of the input for the gemm kernel - const auto& input_layout = impl_param.input_layouts[input_idx]; + const auto& input_layout = impl_param->input_layouts[input_idx]; size_t input_directions = input_layout.spatial(1); if (input_directions > 1) { // For bidirection input, input direction can be 1 or 0 diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/max_unpooling.cpp b/src/plugins/intel_gpu/src/graph/impls/ocl/max_unpooling.cpp index a3ec27b83bb012..36b680b5f99fb6 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/max_unpooling.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/max_unpooling.cpp @@ -40,13 +40,13 @@ struct max_unpooling_impl : typed_primitive_impl_ocl { return parent::execute_impl(tmp_events, instance); } - static primitive_impl* create(const max_unpooling_node& arg, const kernel_impl_params& impl_param) { - auto max_unpooling_params = get_default_params(impl_param); + static primitive_impl* create(const max_unpooling_node& arg, std::shared_ptr impl_param) { + auto max_unpooling_params = get_default_params(*impl_param); auto max_unpooling_optional_params = get_default_optional_params(arg.get_program()); const auto max_idx = 1; - max_unpooling_params.inputs.push_back(convert_data_tensor(impl_param.input_layouts[max_idx])); + max_unpooling_params.inputs.push_back(convert_data_tensor(impl_param->input_layouts[max_idx])); auto& kernel_selector = kernel_selector::max_unpooling_kernel_selector::Instance(); auto best_kernels = kernel_selector.GetBestKernels(max_unpooling_params, max_unpooling_optional_params); diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/mutable_data.cpp b/src/plugins/intel_gpu/src/graph/impls/ocl/mutable_data.cpp index a3d876d6ec9e98..a6c043cb7bdb2c 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/mutable_data.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/mutable_data.cpp @@ -18,7 +18,7 @@ struct mutable_data_impl : public typed_primitive_impl_ocl { } public: - static primitive_impl* create(mutable_data_node const& arg, const kernel_impl_params&) { return new mutable_data_impl(arg, {}); } + static primitive_impl* create(mutable_data_node const& arg, std::shared_ptr) { return new mutable_data_impl(arg, {}); } }; namespace detail { diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/mvn.cpp b/src/plugins/intel_gpu/src/graph/impls/ocl/mvn.cpp index 0830cb0307ea0e..b3c36ce39eea78 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/mvn.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/mvn.cpp @@ -26,9 +26,9 @@ struct mvn_impl : typed_primitive_impl_ocl { } public: - static primitive_impl* create(const mvn_node& arg, const kernel_impl_params& impl_param) { + static primitive_impl* create(const mvn_node& arg, std::shared_ptr impl_param) { const auto& prim = arg.get_primitive(); - auto mvn_params = get_default_params(impl_param); + auto mvn_params = get_default_params(*impl_param); auto mvn_optional_params = get_default_optional_params(arg.get_program()); mvn_params.mvnMode = prim->across_channels ? kernel_selector::mvn_mode::ACROSS_CHANNELS diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/non_max_suppression.cpp b/src/plugins/intel_gpu/src/graph/impls/ocl/non_max_suppression.cpp index 74e2ba5783ce7f..7bad1570f2544a 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/non_max_suppression.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/non_max_suppression.cpp @@ -53,14 +53,14 @@ struct non_max_suppression_impl : typed_primitive_impl_ocl } public: - static primitive_impl* create(const non_max_suppression_node& arg, const kernel_impl_params& impl_param) { + static primitive_impl* create(const non_max_suppression_node& arg, std::shared_ptr impl_param) { const auto& primitive = arg.get_primitive(); - auto params = get_default_params(impl_param); + auto params = get_default_params(*impl_param); auto optional_params = get_default_optional_params(arg.get_program()); const auto input_scores_idx = 1; - params.inputs.push_back(convert_data_tensor(impl_param.input_layouts[input_scores_idx])); + params.inputs.push_back(convert_data_tensor(impl_param->input_layouts[input_scores_idx])); if (arg.has_num_select_per_class()) { cldnn::program_node& node = arg.num_select_per_class_node(); @@ -69,7 +69,7 @@ struct non_max_suppression_impl : typed_primitive_impl_ocl params.num_select_per_class = get_value(node); } else { params.num_select_per_class_type = kernel_selector::NmsArgType::Input; - params.inputs.push_back(convert_data_tensor(impl_param.output_layout)); + params.inputs.push_back(convert_data_tensor(impl_param->output_layout)); } } @@ -80,7 +80,7 @@ struct non_max_suppression_impl : typed_primitive_impl_ocl params.iou_threshold = get_value(node); } else { params.iou_threshold_type = kernel_selector::NmsArgType::Input; - params.inputs.push_back(convert_data_tensor(impl_param.output_layout)); + params.inputs.push_back(convert_data_tensor(impl_param->output_layout)); } } @@ -91,7 +91,7 @@ struct non_max_suppression_impl : typed_primitive_impl_ocl params.score_threshold = get_value(node); } else { params.score_threshold_type = kernel_selector::NmsArgType::Input; - params.inputs.push_back(convert_data_tensor(impl_param.output_layout)); + params.inputs.push_back(convert_data_tensor(impl_param->output_layout)); } } @@ -102,7 +102,7 @@ struct non_max_suppression_impl : typed_primitive_impl_ocl params.soft_nms_sigma = get_value(node); } else { params.soft_nms_sigma_type = kernel_selector::NmsArgType::Input; - params.inputs.push_back(convert_data_tensor(impl_param.output_layout)); + params.inputs.push_back(convert_data_tensor(impl_param->output_layout)); } } @@ -126,12 +126,12 @@ struct non_max_suppression_impl : typed_primitive_impl_ocl }; if (arg.has_second_output()) { - params.inputs.push_back(convert_data_tensor(impl_param.input_layouts[get_second_output_node_idx()])); + params.inputs.push_back(convert_data_tensor(impl_param->input_layouts[get_second_output_node_idx()])); params.has_second_output = true; } if (arg.has_third_output()) { - params.inputs.push_back(convert_data_tensor(impl_param.input_layouts[get_third_output_node_idx()])); + params.inputs.push_back(convert_data_tensor(impl_param->input_layouts[get_third_output_node_idx()])); params.has_third_output = true; } diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/normalize.cpp b/src/plugins/intel_gpu/src/graph/impls/ocl/normalize.cpp index ee3f9eaa5221aa..b81625c96fa6ef 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/normalize.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/normalize.cpp @@ -33,13 +33,13 @@ struct normalize_impl : typed_primitive_impl_ocl { } public: - static primitive_impl* create(const normalize_node& arg, const kernel_impl_params& impl_param) { + static primitive_impl* create(const normalize_node& arg, std::shared_ptr impl_param) { const auto& prim = arg.get_primitive(); - auto norm_params = get_default_params(impl_param); + auto norm_params = get_default_params(*impl_param); auto norm_optional_params = get_default_optional_params(arg.get_program()); - const auto& scale_layout = impl_param.input_layouts[1]; + const auto& scale_layout = impl_param->input_layouts[1]; norm_params.normMode = prim->across_spatial ? kernel_selector::normalize_mode::ACROSS_SPATIAL : kernel_selector::normalize_mode::WITHIN_SPATIAL; diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/one_hot.cpp b/src/plugins/intel_gpu/src/graph/impls/ocl/one_hot.cpp index 61229524250d9b..0981927d845cc2 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/one_hot.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/one_hot.cpp @@ -23,9 +23,9 @@ struct one_hot_impl : typed_primitive_impl_ocl { return make_unique(*this); } - static primitive_impl* create(const one_hot_node& arg, const kernel_impl_params& impl_param) { + static primitive_impl* create(const one_hot_node& arg, std::shared_ptr impl_param) { const auto& prim = arg.get_primitive(); - auto oh_params = get_default_params(impl_param, 1); + auto oh_params = get_default_params(*impl_param, 1); auto oh_optional_params = get_default_optional_params(arg.get_program()); @@ -33,7 +33,7 @@ struct one_hot_impl : typed_primitive_impl_ocl { oh_params.on_value = prim->on_value; oh_params.off_value = prim->off_value; - auto output_sizes = impl_param.output_layout.get_dims(); + auto output_sizes = impl_param->output_layout.get_dims(); oh_params.one_hot_limit = output_sizes[oh_params.one_hot_axis]; diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/permute.cpp b/src/plugins/intel_gpu/src/graph/impls/ocl/permute.cpp index e5356e14ca25f9..29407b86f69089 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/permute.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/permute.cpp @@ -50,13 +50,13 @@ struct permute_impl : typed_primitive_impl_ocl { return make_unique(*this); } - static primitive_impl* create(const permute_node& arg, const kernel_impl_params& impl_param) { + static primitive_impl* create(const permute_node& arg, std::shared_ptr impl_param) { const auto& prim = arg.get_primitive(); - auto permute_params = get_default_params(impl_param); + auto permute_params = get_default_params(*impl_param); auto permute_optional_params = get_default_optional_params(arg.get_program()); - auto in_rank = impl_param.input_layouts[0].get_rank(); + auto in_rank = impl_param->input_layouts[0].get_rank(); auto permute_order = convert_permute_order(prim->permute_order, in_rank); permute_params.order = permute_order; auto& kernel_selector = kernel_selector::permute_kernel_selector::Instance(); diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/pooling.cpp b/src/plugins/intel_gpu/src/graph/impls/ocl/pooling.cpp index d6a2bf695c3c7e..ace6a61c0f9e0c 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/pooling.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/pooling.cpp @@ -77,10 +77,10 @@ struct pooling_impl : typed_primitive_impl_ocl { } public: - static primitive_impl* create(const pooling_node& arg, const kernel_impl_params& impl_param) { + static primitive_impl* create(const pooling_node& arg, std::shared_ptr impl_param) { validate_args(arg); const auto primitive = arg.get_primitive(); - auto pool_params = get_default_params(impl_param); + auto pool_params = get_default_params(*impl_param); auto pool_optional_params = get_default_optional_params(arg.get_program()); @@ -105,8 +105,8 @@ struct pooling_impl : typed_primitive_impl_ocl { const auto& pad = primitive->pad; const auto& dilation = primitive->dilation; auto kernel = primitive->size; - const auto& input_layout = impl_param.input_layouts[0]; - const auto& output_layout = impl_param.output_layout; + const auto& input_layout = impl_param->input_layouts[0]; + const auto& output_layout = impl_param->output_layout; auto spatial_rank = output_layout.get_spatial_rank(); auto& pp = pool_params; diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/pyramid_roi_align.cpp b/src/plugins/intel_gpu/src/graph/impls/ocl/pyramid_roi_align.cpp index bae6f50467e839..69f32ba4b3e6b4 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/pyramid_roi_align.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/pyramid_roi_align.cpp @@ -23,9 +23,9 @@ struct pyramid_roi_align_impl : typed_primitive_impl_ocl { return make_unique(*this); } - static primitive_impl* create(const pyramid_roi_align_node& arg, const kernel_impl_params& impl_param) { + static primitive_impl* create(const pyramid_roi_align_node& arg, std::shared_ptr impl_param) { auto prim = arg.get_primitive(); - auto params = get_default_params(impl_param, 1); + auto params = get_default_params(*impl_param, 1); auto optional_params = get_default_optional_params(arg.get_program()); @@ -33,17 +33,17 @@ struct pyramid_roi_align_impl : typed_primitive_impl_ocl { const auto P3_idx = 2; const auto P4_idx = 3; const auto P5_idx = 4; - params.inputs.push_back(convert_data_tensor(impl_param.input_layouts[P2_idx])); - params.inputs.push_back(convert_data_tensor(impl_param.input_layouts[P3_idx])); - params.inputs.push_back(convert_data_tensor(impl_param.input_layouts[P4_idx])); - params.inputs.push_back(convert_data_tensor(impl_param.input_layouts[P5_idx])); + params.inputs.push_back(convert_data_tensor(impl_param->input_layouts[P2_idx])); + params.inputs.push_back(convert_data_tensor(impl_param->input_layouts[P3_idx])); + params.inputs.push_back(convert_data_tensor(impl_param->input_layouts[P4_idx])); + params.inputs.push_back(convert_data_tensor(impl_param->input_layouts[P5_idx])); params.sampling_ratio_x = prim->sampling_ratio; params.sampling_ratio_y = prim->sampling_ratio; auto first_layer_scale = prim->pyramid_scales[0]; - auto image_size_x = impl_param.input_layouts[P2_idx].spatial(0) * first_layer_scale; - auto image_size_y = impl_param.input_layouts[P2_idx].spatial(1) * first_layer_scale; + auto image_size_x = impl_param->input_layouts[P2_idx].spatial(0) * first_layer_scale; + auto image_size_y = impl_param->input_layouts[P2_idx].spatial(1) * first_layer_scale; params.image_size_x = image_size_x; params.image_size_y = image_size_y; diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/quantize.cpp b/src/plugins/intel_gpu/src/graph/impls/ocl/quantize.cpp index 8e3e031c15807a..e0bddaecb645ab 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/quantize.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/quantize.cpp @@ -43,8 +43,8 @@ struct quantize_impl : typed_primitive_impl_ocl { } public: - static primitive_impl* create(const quantize_node& arg, const kernel_impl_params& impl_param) { - auto quantize_params = get_default_params(impl_param); + static primitive_impl* create(const quantize_node& arg, std::shared_ptr impl_param) { + auto quantize_params = get_default_params(*impl_param); auto quantize_optional_params = get_default_optional_params(arg.get_program()); @@ -75,9 +75,9 @@ struct quantize_impl : typed_primitive_impl_ocl { quantize_params.out_shift = arg.get_output_shift_val(); for (size_t i = 1; i < arg.inputs_count(); i++) { - quantize_params.inputs.push_back(convert_data_tensor(impl_param.input_layouts[i])); + quantize_params.inputs.push_back(convert_data_tensor(impl_param->input_layouts[i])); } - const auto& output_layout = impl_param.output_layout; + const auto& output_layout = impl_param->output_layout; quantize_params.outputs = { convert_data_tensor(output_layout) }; auto& kernel_selector = kernel_selector::quantize_kernel_selector::Instance(); diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/random_uniform.cpp b/src/plugins/intel_gpu/src/graph/impls/ocl/random_uniform.cpp index f187509b2d34f9..1bc142234237f6 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/random_uniform.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/random_uniform.cpp @@ -21,15 +21,15 @@ struct random_uniform_impl : typed_primitive_impl_ocl { return make_unique(*this); } - static primitive_impl *create(const random_uniform_node &arg, const kernel_impl_params& impl_param) { + static primitive_impl *create(const random_uniform_node &arg, std::shared_ptr impl_param) { const auto &primitive = arg.get_primitive(); - auto params = get_default_params(impl_param); + auto params = get_default_params(*impl_param); auto &random_uniform_kernel_selector = kernel_selector::random_uniform_kernel_selector::Instance(); params.global_seed = primitive->global_seed; params.op_seed = primitive->op_seed; - params.inputs.push_back(convert_data_tensor(impl_param.input_layouts[1])); - params.inputs.push_back(convert_data_tensor(impl_param.input_layouts[2])); + params.inputs.push_back(convert_data_tensor(impl_param->input_layouts[1])); + params.inputs.push_back(convert_data_tensor(impl_param->input_layouts[2])); auto best_kernels = random_uniform_kernel_selector.GetBestKernels(params, kernel_selector::random_uniform_optional_params()); CLDNN_ERROR_BOOL(arg.id(), diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/range.cpp b/src/plugins/intel_gpu/src/graph/impls/ocl/range.cpp index 8d1f0e744b58a0..370aa0579a5b15 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/range.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/range.cpp @@ -20,10 +20,10 @@ struct range_impl : typed_primitive_impl_ocl { return make_unique(*this); } - static primitive_impl* create(const range_node& arg, const kernel_impl_params& impl_param) { - auto params = get_default_params(impl_param); + static primitive_impl* create(const range_node& arg, std::shared_ptr impl_param) { + auto params = get_default_params(*impl_param); for (int i : {1, 2}) - params.inputs.push_back(convert_data_tensor(impl_param.input_layouts[i])); + params.inputs.push_back(convert_data_tensor(impl_param->input_layouts[i])); auto optional_params = get_default_optional_params(arg.get_program()); diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/reduce.cpp b/src/plugins/intel_gpu/src/graph/impls/ocl/reduce.cpp index 3e9bdc7daa4614..80a319c6bff7bb 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/reduce.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/reduce.cpp @@ -58,9 +58,9 @@ struct reduce_impl : typed_primitive_impl_ocl { } public: - static primitive_impl* create(const reduce_node& arg, const kernel_impl_params& impl_param) { + static primitive_impl* create(const reduce_node& arg, std::shared_ptr impl_param) { const auto& prim = arg.get_primitive(); - auto reduce_params = get_default_params(impl_param); + auto reduce_params = get_default_params(*impl_param); auto reduce_optional_params = get_default_optional_params(arg.get_program()); reduce_params.reduceAxes = prim->axes; diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/region_yolo.cpp b/src/plugins/intel_gpu/src/graph/impls/ocl/region_yolo.cpp index 7e139a018d3557..2b0449cf3615cd 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/region_yolo.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/region_yolo.cpp @@ -21,8 +21,8 @@ struct region_yolo_impl : typed_primitive_impl_ocl { return make_unique(*this); } - static primitive_impl* create(const region_yolo_node& arg, const kernel_impl_params& impl_param) { - auto ry_params = get_default_params(impl_param); + static primitive_impl* create(const region_yolo_node& arg, std::shared_ptr impl_param) { + auto ry_params = get_default_params(*impl_param); auto ry_optional_params = get_default_optional_params(arg.get_program()); diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/reorder.cpp b/src/plugins/intel_gpu/src/graph/impls/ocl/reorder.cpp index 4bd78d39306d11..60f3e1e210bc13 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/reorder.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/reorder.cpp @@ -41,28 +41,28 @@ struct reorder_impl : typed_primitive_impl_ocl { } public: - static primitive_impl* create(const reorder_node& arg, const kernel_impl_params& impl_param) { + static primitive_impl* create(const reorder_node& arg, std::shared_ptr impl_param) { const auto& prim = arg.get_primitive(); - auto&& output_layout = impl_param.output_layout; - auto reorder_params = get_default_params(impl_param); + auto&& output_layout = impl_param->output_layout; + auto reorder_params = get_default_params(*impl_param); auto reorder_optional_params = get_default_optional_params(arg.get_program()); for (size_t i = 1; i < arg.inputs_count(); i++) { - reorder_params.inputs.push_back(convert_data_tensor(impl_param.input_layouts[i])); + reorder_params.inputs.push_back(convert_data_tensor(impl_param->input_layouts[i])); } - if (impl_param.output_layout.data_padding) { + if (impl_param->output_layout.data_padding) { reorder_params.has_padded_output = true; } if (arg.has_mean()) { - if (impl_param.input_layouts[0].format == cldnn::format::nv12) { + if (impl_param->input_layouts[0].format == cldnn::format::nv12) { const auto& mean_layout = arg.mean_nv12().get_output_layout(); reorder_params.mean = convert_data_tensor(mean_layout); reorder_params.mode = kernel_selector::mean_subtruct_mode::IN_BUFFER; } else { const auto mean_idx = 1; - const auto& mean_layout = impl_param.input_layouts[mean_idx]; + const auto& mean_layout = impl_param->input_layouts[mean_idx]; reorder_params.mean = convert_data_tensor(mean_layout); reorder_params.mode = kernel_selector::mean_subtruct_mode::IN_BUFFER; } @@ -98,7 +98,7 @@ struct reorder_impl : typed_primitive_impl_ocl { reorder_params.winograd_nr_tiles_x = ceil_div(output_layout.spatial(0), 4); } - reorder_params.winograd = impl_param.input_layouts[0].format.is_winograd() || output_layout.format.is_winograd(); + reorder_params.winograd = impl_param->input_layouts[0].format.is_winograd() || output_layout.format.is_winograd(); auto& kernel_selector = kernel_selector::reorder_kernel_selector::Instance(); auto best_kernels = kernel_selector.GetBestKernels(reorder_params, reorder_optional_params); diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/reorg_yolo.cpp b/src/plugins/intel_gpu/src/graph/impls/ocl/reorg_yolo.cpp index dc18739a13a432..58b6372bb3531f 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/reorg_yolo.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/reorg_yolo.cpp @@ -21,9 +21,9 @@ struct reorg_yolo_impl : typed_primitive_impl_ocl { return make_unique(*this); } - static primitive_impl* create(const reorg_yolo_node& arg, const kernel_impl_params& impl_param) { + static primitive_impl* create(const reorg_yolo_node& arg, std::shared_ptr impl_param) { const auto& primitive = arg.get_primitive(); - auto ry_params = get_default_params(impl_param); + auto ry_params = get_default_params(*impl_param); auto ry_optional_params = get_default_optional_params(arg.get_program()); diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/resample.cpp b/src/plugins/intel_gpu/src/graph/impls/ocl/resample.cpp index 4fad1300f8b405..26a663fbb6ec84 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/resample.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/resample.cpp @@ -104,13 +104,13 @@ struct resample_impl : typed_primitive_impl_ocl { return make_unique(*this); } - static primitive_impl* create(const resample_node& arg, const kernel_impl_params& impl_param) { + static primitive_impl* create(const resample_node& arg, std::shared_ptr impl_param) { const auto& primitive = arg.get_primitive(); - auto us_params = get_default_params(impl_param); + auto us_params = get_default_params(*impl_param); auto us_optional_params = get_default_optional_params(arg.get_program()); - size_t dimsNum = impl_param.output_layout.format.dimension(); + size_t dimsNum = impl_param->output_layout.format.dimension(); us_params.resampleType = convert_to_sample_type(primitive->operation_type); us_params.nearestMode = convert_to_nearest_mode(primitive->round_mode); us_params.coordTransMode = convert_to_coord_transform_mode(primitive->coord_trans_mode); diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/reshape.cpp b/src/plugins/intel_gpu/src/graph/impls/ocl/reshape.cpp index 40be6e75f9961b..2e2d175650954c 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/reshape.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/reshape.cpp @@ -22,11 +22,11 @@ struct reshape_impl : public typed_primitive_impl_ocl { } public: - static primitive_impl* create(reshape_node const& arg, const kernel_impl_params& impl_param) { + static primitive_impl* create(reshape_node const& arg, std::shared_ptr impl_param) { if (arg.can_be_optimized()) { return new reshape_impl(arg, {}); } - auto reorder_params = get_default_params(impl_param); + auto reorder_params = get_default_params(*impl_param); auto reorder_optional_params = get_default_optional_params(arg.get_program()); diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/reverse_sequence.cpp b/src/plugins/intel_gpu/src/graph/impls/ocl/reverse_sequence.cpp index 766104a681f7d3..217cad0daa2fd6 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/reverse_sequence.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/reverse_sequence.cpp @@ -23,16 +23,16 @@ struct reverse_sequence_impl : typed_primitive_impl_ocl { } public: - static primitive_impl* create(const reverse_sequence_node& arg, const kernel_impl_params& impl_param) { + static primitive_impl* create(const reverse_sequence_node& arg, std::shared_ptr impl_param) { const auto& prim = arg.get_primitive(); - auto reverse_sequence_params = get_default_params(impl_param); + auto reverse_sequence_params = get_default_params(*impl_param); auto reverse_sequence_optional_params = get_default_optional_params(arg.get_program()); reverse_sequence_params.seq_axis = prim->seq_axis; reverse_sequence_params.batch_axis = prim->batch_axis; - reverse_sequence_params.inputs.push_back(convert_data_tensor(impl_param.input_layouts[1])); + reverse_sequence_params.inputs.push_back(convert_data_tensor(impl_param->input_layouts[1])); auto& kernel_selector = kernel_selector::reverse_sequence_kernel_selector::Instance(); auto best_kernels = kernel_selector.GetBestKernels(reverse_sequence_params, reverse_sequence_optional_params); diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/roi_align.cpp b/src/plugins/intel_gpu/src/graph/impls/ocl/roi_align.cpp index 000055f381839c..d143fab996da89 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/roi_align.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/roi_align.cpp @@ -42,11 +42,11 @@ struct roi_align_impl : typed_primitive_impl_ocl { } public: - static primitive_impl* create(const roi_align_node& arg, const kernel_impl_params& impl_param) { - const auto& input_layout = impl_param.input_layouts[0]; - const auto& output_layout = impl_param.output_layout; - const auto& rois_layout = impl_param.input_layouts[1]; - const auto& batches_layout = impl_param.input_layouts[2]; + static primitive_impl* create(const roi_align_node& arg, std::shared_ptr impl_param) { + const auto& input_layout = impl_param->input_layouts[0]; + const auto& output_layout = impl_param->output_layout; + const auto& rois_layout = impl_param->input_layouts[1]; + const auto& batches_layout = impl_param->input_layouts[2]; const auto& primitive = arg.get_primitive(); const auto padding_filling_value = output_layout.data_padding.filling_value(); @@ -62,7 +62,7 @@ struct roi_align_impl : typed_primitive_impl_ocl { input_layout.format.value, "output_layout.format", output_layout.format); - auto roi_align_params = get_default_params(impl_param); + auto roi_align_params = get_default_params(*impl_param); auto roi_align_optional_params = get_default_optional_params(arg.get_program()); diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/roi_pooling.cpp b/src/plugins/intel_gpu/src/graph/impls/ocl/roi_pooling.cpp index 2e8733383c8ffb..3c5b42b5bf52ec 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/roi_pooling.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/roi_pooling.cpp @@ -59,10 +59,10 @@ struct roi_pooling_impl : typed_primitive_impl_ocl { } public: - static primitive_impl* create(const roi_pooling_node& arg, const kernel_impl_params& impl_param) { - const auto& input_layout = impl_param.input_layouts[0]; - const auto& output_layout = impl_param.output_layout; - const auto& rois_layout = impl_param.input_layouts[1]; + static primitive_impl* create(const roi_pooling_node& arg, std::shared_ptr impl_param) { + const auto& input_layout = impl_param->input_layouts[0]; + const auto& output_layout = impl_param->output_layout; + const auto& rois_layout = impl_param->input_layouts[1]; const auto& primitive = arg.get_primitive(); const auto padding_filling_value = output_layout.data_padding.filling_value(); @@ -78,7 +78,7 @@ struct roi_pooling_impl : typed_primitive_impl_ocl { input_layout.format.value, "output_layout.format", output_layout.format); - auto roi_params = get_default_params(impl_param); + auto roi_params = get_default_params(*impl_param); auto roi_optional_params = get_default_optional_params(arg.get_program()); @@ -86,7 +86,7 @@ struct roi_pooling_impl : typed_primitive_impl_ocl { const auto roi_bf = roi_bfyx.FlattenFeatureAndSpatials(); roi_params.inputs.push_back(roi_bf); if (primitive->mode == pooling_mode::deformable_bilinear && !primitive->no_trans) - roi_params.inputs.push_back(convert_data_tensor(impl_param.input_layouts[2])); + roi_params.inputs.push_back(convert_data_tensor(impl_param->input_layouts[2])); roi_params.mode = cldnn_2_pool_type(primitive->mode); roi_params.position_sensitive = primitive->position_sensitive; roi_params.pooled_width = primitive->pooled_width; diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/scale.cpp b/src/plugins/intel_gpu/src/graph/impls/ocl/scale.cpp index dd28bbe29c203a..2556ac7496328d 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/scale.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/scale.cpp @@ -36,19 +36,19 @@ struct scale_impl : typed_primitive_impl_ocl { } public: - static primitive_impl* create(const scale_node& arg, const kernel_impl_params& impl_param) { - auto ew_params = get_default_params(impl_param); + static primitive_impl* create(const scale_node& arg, std::shared_ptr impl_param) { + auto ew_params = get_default_params(*impl_param); auto ew_optional_params = get_default_optional_params(arg.get_program()); - ew_params.inputs.push_back(convert_data_tensor(impl_param.input_layouts[1])); + ew_params.inputs.push_back(convert_data_tensor(impl_param->input_layouts[1])); ew_params.operations.push_back({{kernel_selector::eltwise_params::InputType::Buffer(0), kernel_selector::eltwise_params::InputType::Buffer(1)}, kernel_selector::eltwise_mode::MUL}); if (arg.bias_term()) { - ew_params.inputs.push_back(convert_data_tensor(impl_param.input_layouts[2])); + ew_params.inputs.push_back(convert_data_tensor(impl_param->input_layouts[2])); ew_params.operations.push_back({{kernel_selector::eltwise_params::InputType::Intermediate(0), kernel_selector::eltwise_params::InputType::Buffer(2)}, kernel_selector::eltwise_mode::ADD}); diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/scatter_elements_update.cpp b/src/plugins/intel_gpu/src/graph/impls/ocl/scatter_elements_update.cpp index 7ae1336944856f..cadd1fc5edb3e9 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/scatter_elements_update.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/scatter_elements_update.cpp @@ -43,16 +43,16 @@ struct scatter_elements_update_impl : typed_primitive_impl_ocl impl_param) { const auto& prim = arg.get_primitive(); - auto scatter_elements_update_params = get_default_params(impl_param); + auto scatter_elements_update_params = get_default_params(*impl_param); auto scatter_elements_update_optional_params = get_default_optional_params(arg.get_program()); scatter_elements_update_params.axis = convert_axis(prim->axis, arg); - scatter_elements_update_params.inputs.push_back(convert_data_tensor(impl_param.input_layouts[1])); - scatter_elements_update_params.inputs.push_back(convert_data_tensor(impl_param.input_layouts[2])); + scatter_elements_update_params.inputs.push_back(convert_data_tensor(impl_param->input_layouts[1])); + scatter_elements_update_params.inputs.push_back(convert_data_tensor(impl_param->input_layouts[2])); auto& kernel_selector = kernel_selector::scatter_elements_update_kernel_selector::Instance(); auto best_kernels = kernel_selector.GetBestKernels(scatter_elements_update_params, scatter_elements_update_optional_params); diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/scatter_nd_update.cpp b/src/plugins/intel_gpu/src/graph/impls/ocl/scatter_nd_update.cpp index 645b6ac23dd896..ce95ac3c87f35b 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/scatter_nd_update.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/scatter_nd_update.cpp @@ -24,15 +24,15 @@ struct scatter_nd_update_impl : typed_primitive_impl_ocl { } public: - static primitive_impl* create(const scatter_nd_update_node& arg, const kernel_impl_params& impl_param) { - auto scatter_nd_update_params = get_default_params(impl_param); + static primitive_impl* create(const scatter_nd_update_node& arg, std::shared_ptr impl_param) { + auto scatter_nd_update_params = get_default_params(*impl_param); auto scatter_nd_update_optional_params = get_default_optional_params(arg.get_program()); scatter_nd_update_params.indices_rank = arg.get_primitive()->indices_rank; - scatter_nd_update_params.inputs.push_back(convert_data_tensor(impl_param.input_layouts[1])); - scatter_nd_update_params.inputs.push_back(convert_data_tensor(impl_param.input_layouts[2])); + scatter_nd_update_params.inputs.push_back(convert_data_tensor(impl_param->input_layouts[1])); + scatter_nd_update_params.inputs.push_back(convert_data_tensor(impl_param->input_layouts[2])); auto& kernel_selector = kernel_selector::scatter_nd_update_kernel_selector::Instance(); auto best_kernels = kernel_selector.GetBestKernels(scatter_nd_update_params, scatter_nd_update_optional_params); diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/scatter_update.cpp b/src/plugins/intel_gpu/src/graph/impls/ocl/scatter_update.cpp index b4198c5e6234b0..bb6cf69246de38 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/scatter_update.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/scatter_update.cpp @@ -43,15 +43,15 @@ struct scatter_update_impl : typed_primitive_impl_ocl { } public: - static primitive_impl* create(const scatter_update_node& arg, const kernel_impl_params& impl_param) { - auto scatter_update_params = get_default_params(impl_param); + static primitive_impl* create(const scatter_update_node& arg, std::shared_ptr impl_param) { + auto scatter_update_params = get_default_params(*impl_param); auto scatter_update_optional_params = get_default_optional_params(arg.get_program()); scatter_update_params.axis = convert_axis(arg.get_primitive()->axis, arg); - scatter_update_params.inputs.push_back(convert_data_tensor(impl_param.input_layouts[1])); - scatter_update_params.inputs.push_back(convert_data_tensor(impl_param.input_layouts[2])); + scatter_update_params.inputs.push_back(convert_data_tensor(impl_param->input_layouts[1])); + scatter_update_params.inputs.push_back(convert_data_tensor(impl_param->input_layouts[2])); auto& kernel_selector = kernel_selector::scatter_update_kernel_selector::Instance(); auto best_kernels = kernel_selector.GetBestKernels(scatter_update_params, scatter_update_optional_params); diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/select.cpp b/src/plugins/intel_gpu/src/graph/impls/ocl/select.cpp index 0085d80a2e2a91..8dd504336f6ac3 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/select.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/select.cpp @@ -22,13 +22,13 @@ struct select_impl : typed_primitive_impl_ocl