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 50da32e5dc59d3..28949bd7bab24d 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/activation.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/activation.cpp @@ -28,7 +28,7 @@ struct activation_impl : typed_primitive_impl_ocl { DECLARE_OBJECT_TYPE_SERIALIZATION(cldnn::ocl::activation_impl) std::unique_ptr clone() const override { - return make_unique(*this); + return make_deep_copy(*this); } void load(BinaryInputBuffer& ib) override { diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/adaptive_pooling.cpp b/src/plugins/intel_gpu/src/graph/impls/ocl/adaptive_pooling.cpp index 9f8f3ecfa5b7e2..58c943d9747348 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/adaptive_pooling.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/adaptive_pooling.cpp @@ -19,7 +19,7 @@ struct adaptive_pooling_impl : public typed_primitive_impl_ocl DECLARE_OBJECT_TYPE_SERIALIZATION(cldnn::ocl::adaptive_pooling_impl) std::unique_ptr clone() const override { - return make_unique(*this); + return make_deep_copy(*this); } protected: 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 42c5208705e677..dd1e8d256860d7 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 @@ -42,7 +42,7 @@ struct arg_max_min_impl : typed_primitive_impl_ocl { DECLARE_OBJECT_TYPE_SERIALIZATION(cldnn::ocl::arg_max_min_impl) std::unique_ptr clone() const override { - return make_unique(*this); + return make_deep_copy(*this); } void load(BinaryInputBuffer& ib) override { 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 87e73704b7e7cd..0863114f5c5456 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 @@ -18,7 +18,7 @@ struct batch_to_space_impl : typed_primitive_impl_ocl { DECLARE_OBJECT_TYPE_SERIALIZATION(cldnn::ocl::batch_to_space_impl) std::unique_ptr clone() const override { - return make_unique(*this); + return make_deep_copy(*this); } static kernel_params_t get_kernel_params(const kernel_impl_params& impl_param) { 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 9bd345427c5619..b6016646023d36 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/border.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/border.cpp @@ -21,7 +21,7 @@ struct border_impl : typed_primitive_impl_ocl { DECLARE_OBJECT_TYPE_SERIALIZATION(cldnn::ocl::border_impl) std::unique_ptr clone() const override { - return make_unique(*this); + return make_deep_copy(*this); } static kernel_params_t get_kernel_params(const kernel_impl_params& impl_param, bool is_shape_agnostic = false) { 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 b98a573152293c..177a449692732f 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/broadcast.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/broadcast.cpp @@ -20,7 +20,7 @@ struct broadcast_impl : typed_primitive_impl_ocl { DECLARE_OBJECT_TYPE_SERIALIZATION(cldnn::ocl::broadcast_impl) std::unique_ptr clone() const override { - return make_unique(*this); + return make_deep_copy(*this); } void load(BinaryInputBuffer& ib) override { diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/bucketize.cpp b/src/plugins/intel_gpu/src/graph/impls/ocl/bucketize.cpp index 2dd979cc6a16be..7fb2ae2741c149 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/bucketize.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/bucketize.cpp @@ -20,7 +20,7 @@ struct bucketize_impl : typed_primitive_impl_ocl { DECLARE_OBJECT_TYPE_SERIALIZATION(cldnn::ocl::bucketize_impl) std::unique_ptr clone() const override { - return make_unique(*this); + return make_deep_copy(*this); } static kernel_params_t get_kernel_params(const kernel_impl_params& impl_param) { 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 4cef58293cce3c..9fad28261698fb 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/concatenation.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/concatenation.cpp @@ -50,7 +50,7 @@ struct concatenation_impl : typed_primitive_impl_ocl { DECLARE_OBJECT_TYPE_SERIALIZATION(cldnn::ocl::concatenation_impl) std::unique_ptr clone() const override { - return make_unique(*this); + return make_deep_copy(*this); } void load(BinaryInputBuffer& ib) override { 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 670e733c0c4eba..8b44fd4c586e21 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 @@ -19,7 +19,7 @@ struct convert_color_impl : typed_primitive_impl_ocl { DECLARE_OBJECT_TYPE_SERIALIZATION(cldnn::ocl::convert_color_impl) std::unique_ptr clone() const override { - return make_unique(*this); + return make_deep_copy(*this); } protected: 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 e8043fa9fe90a9..d0920397d17cfb 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/convolution.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/convolution.cpp @@ -24,7 +24,7 @@ struct convolution_impl : typed_primitive_impl_ocl { DECLARE_OBJECT_TYPE_SERIALIZATION(cldnn::ocl::convolution_impl) std::unique_ptr clone() const override { - return make_unique(*this); + return make_deep_copy(*this); } void load(BinaryInputBuffer& ib) override { 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 612f2f1752995f..708ed26535edd1 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/crop.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/crop.cpp @@ -20,7 +20,7 @@ struct crop_impl : typed_primitive_impl_ocl { DECLARE_OBJECT_TYPE_SERIALIZATION(cldnn::ocl::crop_impl) std::unique_ptr clone() const override { - return make_unique(*this); + return make_deep_copy(*this); } void load(BinaryInputBuffer& ib) override { 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 377c863b534f1e..0f62341000d8e1 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 @@ -32,7 +32,7 @@ struct ctc_greedy_decoder_impl : typed_primitive_impl_ocl { public: std::unique_ptr clone() const override { - return make_unique(*this); + return make_deep_copy(*this); } static kernel_params_t get_kernel_params(const kernel_impl_params& impl_param) { diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/ctc_loss.cpp b/src/plugins/intel_gpu/src/graph/impls/ocl/ctc_loss.cpp index ae176c571ce331..e14b8bfb08e463 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/ctc_loss.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/ctc_loss.cpp @@ -20,7 +20,7 @@ struct ctc_loss_impl : typed_primitive_impl_ocl { DECLARE_OBJECT_TYPE_SERIALIZATION(cldnn::ocl::ctc_loss_impl) std::unique_ptr clone() const override { - return make_unique(*this); + return make_deep_copy(*this); } static kernel_params_t get_kernel_params(const kernel_impl_params& impl_param) { 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 a7a1d124f29ac1..9a4c417d4f8678 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 @@ -53,7 +53,7 @@ struct cum_sum_impl : typed_primitive_impl_ocl { DECLARE_OBJECT_TYPE_SERIALIZATION(cldnn::ocl::cum_sum_impl) std::unique_ptr clone() const override { - return make_unique(*this); + return make_deep_copy(*this); } void load(BinaryInputBuffer& ib) override { 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 95bd66867c1b8f..868d2e7845cc2e 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/deconvolution.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/deconvolution.cpp @@ -21,7 +21,7 @@ struct deconvolution_impl : typed_primitive_impl_ocl { DECLARE_OBJECT_TYPE_SERIALIZATION(cldnn::ocl::deconvolution_impl) std::unique_ptr clone() const override { - return make_unique(*this); + return make_deep_copy(*this); } protected: 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 b4e96641fc67e7..0635141667c273 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 @@ -19,7 +19,7 @@ struct depth_to_space_impl : typed_primitive_impl_ocl { DECLARE_OBJECT_TYPE_SERIALIZATION(cldnn::ocl::depth_to_space_impl) std::unique_ptr clone() const override { - return make_unique(*this); + return make_deep_copy(*this); } static kernel_params_t get_kernel_params(const kernel_impl_params& impl_param) { 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 d64076653d703a..67916155a9a99b 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 @@ -21,7 +21,7 @@ struct detection_output_impl : typed_primitive_impl_ocl { DECLARE_OBJECT_TYPE_SERIALIZATION(cldnn::ocl::detection_output_impl) std::unique_ptr clone() const override { - return make_unique(*this); + return make_deep_copy(*this); } public: diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/dft.cpp b/src/plugins/intel_gpu/src/graph/impls/ocl/dft.cpp index 59e1f28e5afd2c..07b0690a7e7d67 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/dft.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/dft.cpp @@ -19,7 +19,7 @@ struct dft_impl : typed_primitive_impl_ocl { DECLARE_OBJECT_TYPE_SERIALIZATION(cldnn::ocl::dft_impl) std::unique_ptr clone() const override { - return make_unique(*this); + return make_deep_copy(*this); } static kernel_params_t get_kernel_params(const kernel_impl_params& impl_param) { diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/dynamic_quantize.cpp b/src/plugins/intel_gpu/src/graph/impls/ocl/dynamic_quantize.cpp index 144f58a4c0c3ea..b9fe00ac525720 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/dynamic_quantize.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/dynamic_quantize.cpp @@ -21,7 +21,7 @@ struct dynamic_quantize_impl : typed_primitive_impl_ocl { DECLARE_OBJECT_TYPE_SERIALIZATION(cldnn::ocl::dynamic_quantize_impl); std::unique_ptr clone() const override { - return make_unique(*this); + return make_deep_copy(*this); } void load(BinaryInputBuffer& ib) override { 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 ad836064f455d4..f8960274ab730f 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/eltwise.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/eltwise.cpp @@ -20,7 +20,7 @@ struct eltwise_impl : typed_primitive_impl_ocl { DECLARE_OBJECT_TYPE_SERIALIZATION(cldnn::ocl::eltwise_impl) std::unique_ptr clone() const override { - return make_unique(*this); + return make_deep_copy(*this); } void load(BinaryInputBuffer& ib) override { 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 43ed52e50b81b3..6cf84edda58c7b 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 @@ -19,7 +19,7 @@ struct embedding_bag_impl : typed_primitive_impl_ocl { DECLARE_OBJECT_TYPE_SERIALIZATION(cldnn::ocl::embedding_bag_impl) std::unique_ptr clone() const override { - return make_unique(*this); + return make_deep_copy(*this); } static kernel_params_t get_kernel_params(const kernel_impl_params& impl_param) { diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/experimental_detectron_detection_output.cpp b/src/plugins/intel_gpu/src/graph/impls/ocl/experimental_detectron_detection_output.cpp index df65ba8beea5c6..126bc5b42e2406 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/experimental_detectron_detection_output.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/experimental_detectron_detection_output.cpp @@ -20,7 +20,7 @@ struct experimental_detectron_detection_output_impl DECLARE_OBJECT_TYPE_SERIALIZATION(cldnn::ocl::experimental_detectron_detection_output_impl) std::unique_ptr clone() const override { - return make_unique(*this); + return make_deep_copy(*this); } protected: diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/experimental_detectron_generate_proposals_single_image.cpp b/src/plugins/intel_gpu/src/graph/impls/ocl/experimental_detectron_generate_proposals_single_image.cpp index 6242b987369126..92f62ecfe5fd1a 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/experimental_detectron_generate_proposals_single_image.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/experimental_detectron_generate_proposals_single_image.cpp @@ -20,7 +20,7 @@ struct experimental_detectron_generate_proposals_single_image_impl DECLARE_OBJECT_TYPE_SERIALIZATION(cldnn::ocl::experimental_detectron_generate_proposals_single_image_impl) std::unique_ptr clone() const override { - return make_unique(*this); + return make_deep_copy(*this); } protected: diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/experimental_detectron_prior_grid_generator.cpp b/src/plugins/intel_gpu/src/graph/impls/ocl/experimental_detectron_prior_grid_generator.cpp index ab37af9196a165..74f6d4d12ea578 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/experimental_detectron_prior_grid_generator.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/experimental_detectron_prior_grid_generator.cpp @@ -21,7 +21,7 @@ struct experimental_detectron_prior_grid_generator_impl DECLARE_OBJECT_TYPE_SERIALIZATION(cldnn::ocl::experimental_detectron_prior_grid_generator_impl) std::unique_ptr clone() const override { - return make_unique(*this); + return make_deep_copy(*this); } static kernel_params_t get_kernel_params(const kernel_impl_params& impl_param) { 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 ae008547fe30b6..d3bbac2a7d1207 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 @@ -19,7 +19,7 @@ struct experimental_detectron_roi_feature_extractor_impl : public typed_primitiv DECLARE_OBJECT_TYPE_SERIALIZATION(cldnn::ocl::experimental_detectron_roi_feature_extractor_impl) std::unique_ptr clone() const override { - return make_unique(*this); + return make_deep_copy(*this); } event::ptr execute_impl(const std::vector& events, 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 177b9890309ebf..55cc1da32a3873 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 @@ -20,7 +20,7 @@ struct experimental_detectron_topk_rois_impl : typed_primitive_impl_ocl clone() const override { - return make_unique(*this); + return make_deep_copy(*this); } static kernel_params_t get_kernel_params(const kernel_impl_params& impl_param) { 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 b8bcdf4082ee9a..0639f6b67a112e 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 @@ -30,7 +30,7 @@ struct extract_image_patches_impl : typed_primitive_impl_ocl clone() const override { - return make_unique(*this); + return make_deep_copy(*this); } static kernel_params_t get_kernel_params(const kernel_impl_params& impl_param) { diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/eye.cpp b/src/plugins/intel_gpu/src/graph/impls/ocl/eye.cpp index 1ecd2176a29034..8b3c8b82bc805d 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/eye.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/eye.cpp @@ -20,7 +20,7 @@ struct eye_impl : typed_primitive_impl_ocl { DECLARE_OBJECT_TYPE_SERIALIZATION(cldnn::ocl::eye_impl) std::unique_ptr clone() const override { - return make_unique(*this); + return make_deep_copy(*this); } static kernel_params_t get_kernel_params(const kernel_impl_params& impl_param) { 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 de17306a5eb2b2..04f691c2bd2ca9 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 @@ -45,7 +45,7 @@ struct fully_connected_impl : typed_primitive_impl_ocl { } std::unique_ptr clone() const override { - return make_unique(*this); + return make_deep_copy(*this); } void load(BinaryInputBuffer& ib) override { 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 43f413c7e083d6..60b73a3614ead6 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/gather.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/gather.cpp @@ -64,7 +64,7 @@ struct gather_impl : typed_primitive_impl_ocl { DECLARE_OBJECT_TYPE_SERIALIZATION(cldnn::ocl::gather_impl) std::unique_ptr clone() const override { - return make_unique(*this); + return make_deep_copy(*this); } void load(BinaryInputBuffer& ib) override { 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 4a3f9d788355ee..3a5b6d22a352e8 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 @@ -51,7 +51,7 @@ struct gather_elements_impl : typed_primitive_impl_ocl { DECLARE_OBJECT_TYPE_SERIALIZATION(cldnn::ocl::gather_elements_impl) std::unique_ptr clone() const override { - return make_unique(*this); + return make_deep_copy(*this); } void load(BinaryInputBuffer& ib) override { 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 48416e76e43f08..01b87dff8335e7 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 @@ -21,7 +21,7 @@ struct gather_nd_impl : typed_primitive_impl_ocl { DECLARE_OBJECT_TYPE_SERIALIZATION(cldnn::ocl::gather_nd_impl) std::unique_ptr clone() const override { - return make_unique(*this); + return make_deep_copy(*this); } void load(BinaryInputBuffer& ib) override { 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 7b510d1d7e4a16..f25805ed8ade12 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 @@ -20,7 +20,7 @@ struct gather_tree_impl : typed_primitive_impl_ocl { DECLARE_OBJECT_TYPE_SERIALIZATION(cldnn::ocl::gather_tree_impl) std::unique_ptr clone() const override { - return make_unique(*this); + return make_deep_copy(*this); } static kernel_params_t get_kernel_params(const kernel_impl_params& impl_param) { 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 174ea1fa1767a9..7277b0068d1497 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/gemm.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/gemm.cpp @@ -32,7 +32,7 @@ struct gemm_impl : multi_stage_primitive { const uint32_t indirect_gemm = 1; std::unique_ptr clone() const override { - return make_unique(*this); + return make_deep_copy(*this); } gemm_impl() = default; diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/generate_proposals.cpp b/src/plugins/intel_gpu/src/graph/impls/ocl/generate_proposals.cpp index 244c77151a812d..27da1d22d21aca 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/generate_proposals.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/generate_proposals.cpp @@ -20,7 +20,7 @@ struct generate_proposals_impl DECLARE_OBJECT_TYPE_SERIALIZATION(cldnn::ocl::generate_proposals_impl) std::unique_ptr clone() const override { - return make_unique(*this); + return make_deep_copy(*this); } protected: diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/grid_sample.cpp b/src/plugins/intel_gpu/src/graph/impls/ocl/grid_sample.cpp index 7265ee7c6387c8..16e460f07f6822 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/grid_sample.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/grid_sample.cpp @@ -49,7 +49,7 @@ struct grid_sample_impl : public typed_primitive_impl_ocl { DECLARE_OBJECT_TYPE_SERIALIZATION(cldnn::ocl::grid_sample_impl) std::unique_ptr clone() const override { - return make_unique(*this); + return make_deep_copy(*this); } static kernel_params_t get_kernel_params(const kernel_impl_params& impl_param) { 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 3f3dd47e0236de..00a6eadc0da39b 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/grn.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/grn.cpp @@ -20,7 +20,7 @@ struct grn_impl : typed_primitive_impl_ocl { DECLARE_OBJECT_TYPE_SERIALIZATION(cldnn::ocl::grn_impl) std::unique_ptr clone() const override { - return make_unique(*this); + return make_deep_copy(*this); } public: diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/group_normalization.cpp b/src/plugins/intel_gpu/src/graph/impls/ocl/group_normalization.cpp index c112fdfa11e40e..4d1beaee07d7b3 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/group_normalization.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/group_normalization.cpp @@ -18,7 +18,7 @@ struct group_normalization_impl : typed_primitive_impl_ocl DECLARE_OBJECT_TYPE_SERIALIZATION(cldnn::ocl::group_normalization_impl) std::unique_ptr clone() const override { - return make_unique(*this); + return make_deep_copy(*this); } void load(BinaryInputBuffer& ib) override { diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/kv_cache.cpp b/src/plugins/intel_gpu/src/graph/impls/ocl/kv_cache.cpp index d0fcace0b3f184..fef2a3c51ee821 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/kv_cache.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/kv_cache.cpp @@ -68,7 +68,7 @@ struct kv_cache_impl : multi_stage_primitive { DECLARE_OBJECT_TYPE_SERIALIZATION(cldnn::ocl::kv_cache_impl) std::unique_ptr clone() const override { - return make_unique(*this); + return make_deep_copy(*this); } const size_t concat_stage = 0; 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 26fda8b7b65271..9c982b5daf27c2 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/lrn.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/lrn.cpp @@ -20,7 +20,7 @@ struct lrn_impl : typed_primitive_impl_ocl { DECLARE_OBJECT_TYPE_SERIALIZATION(cldnn::ocl::lrn_impl) std::unique_ptr clone() const override { - return make_unique(*this); + return make_deep_copy(*this); } static kernel_params_t get_kernel_params(const kernel_impl_params& impl_param) { 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 b055943e057fc1..5de12d83fdbab3 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 @@ -20,7 +20,7 @@ struct lstm_elt_impl : typed_primitive_impl_ocl { DECLARE_OBJECT_TYPE_SERIALIZATION(cldnn::ocl::lstm_elt_impl) std::unique_ptr clone() const override { - return make_unique(*this); + return make_deep_copy(*this); } protected: diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/matrix_nms.cpp b/src/plugins/intel_gpu/src/graph/impls/ocl/matrix_nms.cpp index 4e6a32ace1d8ef..0159ed5a8bf5e8 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/matrix_nms.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/matrix_nms.cpp @@ -44,7 +44,7 @@ struct matrix_nms_impl : typed_primitive_impl_ocl { DECLARE_OBJECT_TYPE_SERIALIZATION(cldnn::ocl::matrix_nms_impl) std::unique_ptr clone() const override { - return make_unique(*this); + return make_deep_copy(*this); } protected: diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/multi_stage_primitive.hpp b/src/plugins/intel_gpu/src/graph/impls/ocl/multi_stage_primitive.hpp index 340fef53327de5..fb3839b6145dc6 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/multi_stage_primitive.hpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/multi_stage_primitive.hpp @@ -141,6 +141,18 @@ struct multi_stage_primitive : public typed_primitive_impl { return {kernels_cache.get_cached_kernel_ids(_kernels)}; } + template + static std::unique_ptr make_deep_copy(const ImplType& impl_ocl) { + auto prim_impl = make_unique(impl_ocl); + for (auto& _kernel_data : (*prim_impl)._kernels_data) { + KernelParamsType* params_ptr = dynamic_cast(_kernel_data.params.get()); + if (params_ptr != nullptr) { + _kernel_data.params = make_unique(*params_ptr); + } + } + return prim_impl; + } + std::vector get_kernels() const override { return _kernels; } diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/multiclass_nms.cpp b/src/plugins/intel_gpu/src/graph/impls/ocl/multiclass_nms.cpp index c07bf9dac81daa..326e6b925dfd18 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/multiclass_nms.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/multiclass_nms.cpp @@ -40,7 +40,7 @@ struct multiclass_nms_impl : public typed_primitive_impl_ocl { DECLARE_OBJECT_TYPE_SERIALIZATION(cldnn::ocl::multiclass_nms_impl) std::unique_ptr clone() const override { - return make_unique(*this); + return make_deep_copy(*this); } protected: diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/multinomial.cpp b/src/plugins/intel_gpu/src/graph/impls/ocl/multinomial.cpp index d18838f819ed75..bba802a7d98ce9 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/multinomial.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/multinomial.cpp @@ -18,7 +18,7 @@ struct multinomial_impl : typed_primitive_impl_ocl { DECLARE_OBJECT_TYPE_SERIALIZATION(cldnn::ocl::multinomial_impl) std::unique_ptr clone() const override { - return make_unique(*this); + return make_deep_copy(*this); } static kernel_params_t get_kernel_params(const kernel_impl_params& impl_param, bool is_shape_agnostic = false) { 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 6c7dc79cc0aeb3..7ba564f485d4e5 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/mvn.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/mvn.cpp @@ -20,7 +20,7 @@ struct mvn_impl : typed_primitive_impl_ocl { DECLARE_OBJECT_TYPE_SERIALIZATION(cldnn::ocl::mvn_impl) std::unique_ptr clone() const override { - return make_unique(*this); + return make_deep_copy(*this); } void load(BinaryInputBuffer& ib) override { 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 c80d0f9f3a7028..3e75c44cfe066b 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 @@ -21,7 +21,7 @@ struct non_max_suppression_impl : typed_primitive_impl_ocl DECLARE_OBJECT_TYPE_SERIALIZATION(cldnn::ocl::non_max_suppression_impl) std::unique_ptr clone() const override { - return make_unique(*this); + return make_deep_copy(*this); } protected: diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/non_zero.cpp b/src/plugins/intel_gpu/src/graph/impls/ocl/non_zero.cpp index bdd6eb37a9d767..44be7824d4b7dd 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/non_zero.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/non_zero.cpp @@ -22,7 +22,7 @@ struct count_nonzero_impl : typed_primitive_impl_ocl { DECLARE_OBJECT_TYPE_SERIALIZATION(cldnn::ocl::count_nonzero_impl) std::unique_ptr clone() const override { - return make_unique(*this); + return make_deep_copy(*this); } void load(BinaryInputBuffer& ib) override { @@ -67,7 +67,7 @@ struct gather_nonzero_impl : typed_primitive_impl_ocl { DECLARE_OBJECT_TYPE_SERIALIZATION(cldnn::ocl::gather_nonzero_impl) std::unique_ptr clone() const override { - return make_unique(*this); + return make_deep_copy(*this); } void load(BinaryInputBuffer& ib) override { 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 b6b705d82e4d20..d65bdb781b34b3 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/normalize.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/normalize.cpp @@ -20,7 +20,7 @@ struct normalize_impl : typed_primitive_impl_ocl { DECLARE_OBJECT_TYPE_SERIALIZATION(cldnn::ocl::normalize_impl) std::unique_ptr clone() const override { - return make_unique(*this); + return make_deep_copy(*this); } protected: 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 abde905dbd2bc1..6b5fbdba4fadd9 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 @@ -20,7 +20,7 @@ struct one_hot_impl : typed_primitive_impl_ocl { DECLARE_OBJECT_TYPE_SERIALIZATION(cldnn::ocl::one_hot_impl) std::unique_ptr clone() const override { - return make_unique(*this); + return make_deep_copy(*this); } static kernel_params_t get_kernel_params(const kernel_impl_params& impl_param) { 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 38585fd380a720..d3559007cfcd1c 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/permute.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/permute.cpp @@ -47,7 +47,7 @@ struct permute_impl : typed_primitive_impl_ocl { DECLARE_OBJECT_TYPE_SERIALIZATION(cldnn::ocl::permute_impl) std::unique_ptr clone() const override { - return make_unique(*this); + return make_deep_copy(*this); } void load(BinaryInputBuffer& ib) override { 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 7d341c46e023c5..136a18f47bd94e 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/pooling.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/pooling.cpp @@ -51,7 +51,7 @@ struct pooling_impl : typed_primitive_impl_ocl { DECLARE_OBJECT_TYPE_SERIALIZATION(cldnn::ocl::pooling_impl) std::unique_ptr clone() const override { - return make_unique(*this); + return make_deep_copy(*this); } protected: diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/primitive_base.hpp b/src/plugins/intel_gpu/src/graph/impls/ocl/primitive_base.hpp index 829cd23d0908f5..041ce8c2787695 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/primitive_base.hpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/primitive_base.hpp @@ -170,6 +170,16 @@ struct typed_primitive_impl_ocl : public typed_primitive_impl { return {kernels_cache.get_cached_kernel_ids(_kernels)}; } + template + static std::unique_ptr make_deep_copy(const ImplType& impl_ocl) { + auto prim_impl = make_unique(impl_ocl); + KernelParamsType* params_ptr = dynamic_cast((*prim_impl)._kernel_data.params.get()); + if (params_ptr != nullptr) { + (*prim_impl)._kernel_data.params = make_unique(*params_ptr); + } + return prim_impl; + } + std::vector get_kernels() const override { return _kernels; } diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/prior_box.cpp b/src/plugins/intel_gpu/src/graph/impls/ocl/prior_box.cpp index b5e7c7b01c4ee8..7d10521f63f5a3 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/prior_box.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/prior_box.cpp @@ -20,7 +20,7 @@ struct prior_box_impl : typed_primitive_impl_ocl { DECLARE_OBJECT_TYPE_SERIALIZATION(cldnn::ocl::prior_box_impl) std::unique_ptr clone() const override { - return make_unique(*this); + return make_deep_copy(*this); } static kernel_params_t get_kernel_params(const kernel_impl_params& impl_param) { 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 93249c08931b3a..3e8a5ded9dd2da 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/quantize.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/quantize.cpp @@ -20,7 +20,7 @@ struct quantize_impl : typed_primitive_impl_ocl { DECLARE_OBJECT_TYPE_SERIALIZATION(cldnn::ocl::quantize_impl) std::unique_ptr clone() const override { - return make_unique(*this); + return make_deep_copy(*this); } void load(BinaryInputBuffer& ib) override { 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 3af560e3e2f270..f69a9f1dab9725 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 @@ -20,7 +20,7 @@ struct random_uniform_impl : typed_primitive_impl_ocl { DECLARE_OBJECT_TYPE_SERIALIZATION(cldnn::ocl::random_uniform_impl) std::unique_ptr clone() const override { - return make_unique(*this); + return make_deep_copy(*this); } static kernel_params_t get_kernel_params(const kernel_impl_params& impl_param) { 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 f6b142f1f13fa5..dcfdc766bf911c 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/range.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/range.cpp @@ -20,7 +20,7 @@ struct range_impl : typed_primitive_impl_ocl { DECLARE_OBJECT_TYPE_SERIALIZATION(cldnn::ocl::range_impl) std::unique_ptr clone() const override { - return make_unique(*this); + return make_deep_copy(*this); } void load(BinaryInputBuffer& ib) override { 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 d937d7fc8a190c..6ead31a1985bae 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/reduce.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/reduce.cpp @@ -69,7 +69,7 @@ struct reduce_impl : typed_primitive_impl_ocl { DECLARE_OBJECT_TYPE_SERIALIZATION(cldnn::ocl::reduce_impl) std::unique_ptr clone() const override { - return make_unique(*this); + return make_deep_copy(*this); } void load(BinaryInputBuffer& ib) override { 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 98e1349b990f9a..e0d7c910fc8cc9 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 @@ -20,7 +20,7 @@ struct region_yolo_impl : typed_primitive_impl_ocl { DECLARE_OBJECT_TYPE_SERIALIZATION(cldnn::ocl::region_yolo_impl) std::unique_ptr clone() const override { - return make_unique(*this); + return make_deep_copy(*this); } static kernel_params_t get_kernel_params(const kernel_impl_params& impl_param) { 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 4ccbcbe9549347..02145301734779 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/reorder.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/reorder.cpp @@ -22,7 +22,7 @@ struct reorder_impl : typed_primitive_impl_ocl { DECLARE_OBJECT_TYPE_SERIALIZATION(cldnn::ocl::reorder_impl) std::unique_ptr clone() const override { - return make_unique(*this); + return make_deep_copy(*this); } void load(BinaryInputBuffer& ib) override { 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 6aa2b6395b69c3..ab1e2bce6ad24d 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 @@ -20,7 +20,7 @@ struct reorg_yolo_impl : typed_primitive_impl_ocl { DECLARE_OBJECT_TYPE_SERIALIZATION(cldnn::ocl::reorg_yolo_impl) std::unique_ptr clone() const override { - return make_unique(*this); + return make_deep_copy(*this); } static kernel_params_t get_kernel_params(const kernel_impl_params& impl_param) { 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 1572b939132568..d1ef25dce6264a 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/resample.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/resample.cpp @@ -137,7 +137,7 @@ struct resample_impl : typed_primitive_impl_ocl { DECLARE_OBJECT_TYPE_SERIALIZATION(cldnn::ocl::resample_impl) std::unique_ptr clone() const override { - return make_unique(*this); + return make_deep_copy(*this); } static kernel_params_t get_kernel_params(const kernel_impl_params& impl_param) { 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 aa20d659e9179a..bac815666aa445 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/reshape.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/reshape.cpp @@ -20,7 +20,7 @@ struct reshape_impl : public typed_primitive_impl_ocl { DECLARE_OBJECT_TYPE_SERIALIZATION(cldnn::ocl::reshape_impl) std::unique_ptr clone() const override { - return make_unique(*this); + return make_deep_copy(*this); } static kernel_params_t get_kernel_params(const kernel_impl_params& impl_param) { diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/reverse.cpp b/src/plugins/intel_gpu/src/graph/impls/ocl/reverse.cpp index aee736b6871299..745c2912170bc6 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/reverse.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/reverse.cpp @@ -20,7 +20,7 @@ struct reverse_impl : typed_primitive_impl_ocl { DECLARE_OBJECT_TYPE_SERIALIZATION(cldnn::ocl::reverse_impl) std::unique_ptr clone() const override { - return make_unique(*this); + return make_deep_copy(*this); } static kernel_params_t get_kernel_params(const kernel_impl_params& impl_param) { 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 03c555487e311c..7845d12a83687c 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 @@ -19,7 +19,7 @@ struct reverse_sequence_impl : typed_primitive_impl_ocl { DECLARE_OBJECT_TYPE_SERIALIZATION(cldnn::ocl::reverse_sequence_impl) std::unique_ptr clone() const override { - return make_unique(*this); + return make_deep_copy(*this); } static kernel_params_t get_kernel_params(const kernel_impl_params& impl_param) { diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/rms.cpp b/src/plugins/intel_gpu/src/graph/impls/ocl/rms.cpp index f862a4c69e0b2d..209a411fbdb640 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/rms.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/rms.cpp @@ -20,7 +20,7 @@ struct rms_impl : typed_primitive_impl_ocl { DECLARE_OBJECT_TYPE_SERIALIZATION(cldnn::ocl::rms_impl); std::unique_ptr clone() const override { - return make_unique(*this); + return make_deep_copy(*this); } void load(BinaryInputBuffer& ib) override { 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 f3865313fb020a..748a66fce8295d 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 @@ -44,7 +44,7 @@ struct roi_align_impl : typed_primitive_impl_ocl { DECLARE_OBJECT_TYPE_SERIALIZATION(cldnn::ocl::roi_align_impl) std::unique_ptr clone() const override { - return make_unique(*this); + return make_deep_copy(*this); } protected: 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 d898c70de82a01..a273496c5a878d 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 @@ -40,7 +40,7 @@ struct roi_pooling_impl : typed_primitive_impl_ocl { DECLARE_OBJECT_TYPE_SERIALIZATION(cldnn::ocl::roi_pooling_impl) std::unique_ptr clone() const override { - return make_unique(*this); + return make_deep_copy(*this); } protected: diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/roll.cpp b/src/plugins/intel_gpu/src/graph/impls/ocl/roll.cpp index 85cff366ac18bf..f7e01d060f2eae 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/roll.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/roll.cpp @@ -20,7 +20,7 @@ struct roll_impl : typed_primitive_impl_ocl { DECLARE_OBJECT_TYPE_SERIALIZATION(cldnn::ocl::roll_impl) std::unique_ptr clone() const override { - return make_unique(*this); + return make_deep_copy(*this); } static kernel_params_t get_kernel_params(const kernel_impl_params& impl_param) { diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/rope.cpp b/src/plugins/intel_gpu/src/graph/impls/ocl/rope.cpp index 1221de7f67b323..27ce085ab83c3f 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/rope.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/rope.cpp @@ -20,7 +20,7 @@ struct rope_impl : typed_primitive_impl_ocl { DECLARE_OBJECT_TYPE_SERIALIZATION(cldnn::ocl::rope_impl); std::unique_ptr clone() const override { - return make_unique(*this); + return make_deep_copy(*this); } void load(BinaryInputBuffer& ib) override { diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/scaled_dot_product_attention.cpp b/src/plugins/intel_gpu/src/graph/impls/ocl/scaled_dot_product_attention.cpp index f4791d38f88742..895fd86bb01e5f 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/scaled_dot_product_attention.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/scaled_dot_product_attention.cpp @@ -29,7 +29,7 @@ struct scaled_dot_product_attention_impl : multi_stage_primitive clone() const override { - return make_unique(*this); + return make_deep_copy(*this); } scaled_dot_product_attention_impl() = default; 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 47d35bf21b5fdb..220900671b5d46 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 @@ -68,7 +68,7 @@ struct scatter_elements_update_impl : typed_primitive_impl_ocl clone() const override { - return make_unique(*this); + return make_deep_copy(*this); } static kernel_params_t get_kernel_params(const kernel_impl_params& impl_param) { 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 9d02993aef9495..a97535f7fcf24d 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 @@ -20,7 +20,7 @@ struct scatter_nd_update_impl : typed_primitive_impl_ocl { DECLARE_OBJECT_TYPE_SERIALIZATION(cldnn::ocl::scatter_nd_update_impl) std::unique_ptr clone() const override { - return make_unique(*this); + return make_deep_copy(*this); } void load(BinaryInputBuffer& ib) override { 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 cc9eca7f284643..c99e25d3ab6174 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 @@ -46,7 +46,7 @@ struct scatter_update_impl : typed_primitive_impl_ocl { DECLARE_OBJECT_TYPE_SERIALIZATION(cldnn::ocl::scatter_update_impl) std::unique_ptr clone() const override { - return make_unique(*this); + return make_deep_copy(*this); } void load(BinaryInputBuffer& ib) override { 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 d84ff02b1c44d4..934bba2eca3b90 100644 --- a/src/plugins/intel_gpu/src/graph/impls/ocl/select.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/ocl/select.cpp @@ -20,7 +20,7 @@ struct select_impl : typed_primitive_impl_ocl