From 457504a61359c31f00da68b010ec36aadb3d3af8 Mon Sep 17 00:00:00 2001 From: Vladimir Paramuzov Date: Wed, 8 Nov 2023 16:06:01 +0400 Subject: [PATCH] [GPU] register read/assign as shape agnostic. Minor fix --- src/plugins/intel_gpu/src/graph/impls/cpu/assign.cpp | 3 ++- src/plugins/intel_gpu/src/graph/impls/cpu/read_value.cpp | 3 ++- src/plugins/intel_gpu/src/plugin/variable_state.cpp | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/plugins/intel_gpu/src/graph/impls/cpu/assign.cpp b/src/plugins/intel_gpu/src/graph/impls/cpu/assign.cpp index 58f2bb67b7a160..9d1ef36a003e03 100644 --- a/src/plugins/intel_gpu/src/graph/impls/cpu/assign.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/cpu/assign.cpp @@ -73,7 +73,8 @@ struct assign_impl : public typed_primitive_impl { namespace detail { attach_assign_impl::attach_assign_impl() { - implementation_map::add(impl_types::cpu, assign_impl::create, {}); + implementation_map::add(impl_types::cpu, shape_types::dynamic_shape, assign_impl::create, {}); + implementation_map::add(impl_types::cpu, shape_types::static_shape, assign_impl::create, {}); } } // namespace detail diff --git a/src/plugins/intel_gpu/src/graph/impls/cpu/read_value.cpp b/src/plugins/intel_gpu/src/graph/impls/cpu/read_value.cpp index 8e86fb7c6e031d..700280195bc702 100644 --- a/src/plugins/intel_gpu/src/graph/impls/cpu/read_value.cpp +++ b/src/plugins/intel_gpu/src/graph/impls/cpu/read_value.cpp @@ -75,7 +75,8 @@ struct read_value_impl : public typed_primitive_impl { namespace detail { attach_read_value_impl::attach_read_value_impl() { - implementation_map::add(impl_types::cpu, read_value_impl::create, {}); + implementation_map::add(impl_types::cpu, shape_types::dynamic_shape, read_value_impl::create, {}); + implementation_map::add(impl_types::cpu, shape_types::static_shape, read_value_impl::create, {}); } } // namespace detail diff --git a/src/plugins/intel_gpu/src/plugin/variable_state.cpp b/src/plugins/intel_gpu/src/plugin/variable_state.cpp index 8dda758724b927..61568d5d06ee86 100644 --- a/src/plugins/intel_gpu/src/plugin/variable_state.cpp +++ b/src/plugins/intel_gpu/src/plugin/variable_state.cpp @@ -64,7 +64,7 @@ void VariableState::set_state(const ov::SoPtr& state) { } void VariableState::update_device_buffer() { - if (m_layout.is_dynamic()) + if (m_layout.is_dynamic() || m_layout.bytes_count() == 0) return; if (actual_size < m_layout.bytes_count()) {