Skip to content

Commit

Permalink
[GPU] Minor state fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Lyamin-Roman committed Nov 12, 2024
1 parent 72bf426 commit 525909e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/plugins/intel_gpu/src/graph/network.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,8 @@ void network::allocate_primitives() {

// Update the output memory address of optimized-out layer if it is not valid.
for (auto const& node : po) {
if (node->can_be_optimized() && !node->is_dynamic()) {
if (node->can_be_optimized() && !node->is_dynamic() &&
(node->get_dependencies().empty() || !node->get_dependency(0).is_type<read_value>())) {
auto opt_inst = _primitives.at(node->id());
// build deps when prim_inst does not update dependencies yet.
if (!node->get_dependencies().empty() && opt_inst->dependencies().empty()) {
Expand Down
3 changes: 2 additions & 1 deletion src/plugins/intel_gpu/src/graph/reshape.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include "openvino/core/validation_util.hpp"
#include "primitive_type_base.h"
#include "reshape_inst.h"
#include "read_value_inst.h"
#include "reshape_shape_inference.hpp"
#include "squeeze_shape_inference.hpp"
#include "unsqueeze_shape_inference.hpp"
Expand Down Expand Up @@ -286,7 +287,7 @@ reshape_inst::typed_primitive_inst(network& network, reshape_node const& node) :

// if reshape operated in-place, postpone creation of the output until network run,
// then create new memory object as the reinterpreted output of the previous primitive
if (input_layout.is_static() && output_layout.is_static()) {
if (input_layout.is_static() && output_layout.is_static() && !node.get_dependency(0).is_type<read_value>()) {
if (!node.can_be_optimized()) {
_outputs = allocate_outputs();
_mem_allocated = true;
Expand Down
1 change: 1 addition & 0 deletions src/plugins/intel_gpu/src/plugin/common_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ void convert_and_copy(const void* src_ptr, ov::element::Type src_et, void* dst_p
CASE(ov::element::f16, ov::element::f16, ov::float16, ov::float16);
CASE(ov::element::bf16, ov::element::f32, ov::bfloat16, float);
CASE(ov::element::bf16, ov::element::f16, ov::bfloat16, ov::float16);
CASE(ov::element::boolean, ov::element::u8, bool, uint8_t);

OPENVINO_THROW("[GPU] Unsupported element types combination for copy: ", src_et, " -> ", dst_et);
}
Expand Down

0 comments on commit 525909e

Please sign in to comment.