Skip to content

Commit

Permalink
[GPU] register read/assign as shape agnostic. Minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
vladimir-paramuzov committed Nov 8, 2023
1 parent da4ff63 commit 457504a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/plugins/intel_gpu/src/graph/impls/cpu/assign.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ struct assign_impl : public typed_primitive_impl<assign> {
namespace detail {

attach_assign_impl::attach_assign_impl() {
implementation_map<assign>::add(impl_types::cpu, assign_impl::create, {});
implementation_map<assign>::add(impl_types::cpu, shape_types::dynamic_shape, assign_impl::create, {});
implementation_map<assign>::add(impl_types::cpu, shape_types::static_shape, assign_impl::create, {});
}

} // namespace detail
Expand Down
3 changes: 2 additions & 1 deletion src/plugins/intel_gpu/src/graph/impls/cpu/read_value.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ struct read_value_impl : public typed_primitive_impl<read_value> {
namespace detail {

attach_read_value_impl::attach_read_value_impl() {
implementation_map<read_value>::add(impl_types::cpu, read_value_impl::create, {});
implementation_map<read_value>::add(impl_types::cpu, shape_types::dynamic_shape, read_value_impl::create, {});
implementation_map<read_value>::add(impl_types::cpu, shape_types::static_shape, read_value_impl::create, {});
}

} // namespace detail
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/intel_gpu/src/plugin/variable_state.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ void VariableState::set_state(const ov::SoPtr<ov::ITensor>& 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()) {
Expand Down

0 comments on commit 457504a

Please sign in to comment.