Skip to content

Commit

Permalink
[GPU] Using a cpu impl type for NMS in a dynamic case (openvinotoolki…
Browse files Browse the repository at this point in the history
  • Loading branch information
Lyamin-Roman authored Dec 14, 2023
1 parent 88c8143 commit 6a50ea3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/plugins/intel_gpu/src/graph/layout_optimizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1493,7 +1493,7 @@ impl_types layout_optimizer::get_preferred_impl_type(program_node& node, format
} else {
const auto scores_layout = nms_node.input_scores().get_output_layout();
if (scores_layout.is_dynamic()) {
preferred_impl = impl_types::ocl;
preferred_impl = impl_types::cpu;
} else {
const size_t kBatchNum = scores_layout.batch();
const size_t kClassNum = scores_layout.feature();
Expand Down
3 changes: 2 additions & 1 deletion src/plugins/intel_gpu/src/graph/primitive_inst.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1404,7 +1404,8 @@ memory::ptr primitive_inst::allocate_output(engine& _engine,

// For outputs, cpu prim we want to have lockable alloc type
// Also if the successor of a node is an cpu, then memory needs to be lockable.
bool is_cpu = _node.get_selected_impl() ? _node.get_selected_impl()->is_cpu() : false;
bool is_cpu = _node.get_selected_impl() ? _node.get_selected_impl()->is_cpu() :
_node.get_preferred_impl_type() == impl_types::cpu;
auto use_lockable_memory =
is_output_buffer || is_cpu ||
has_any_cpu_user_not_shape_of(_node.get_users()) ||
Expand Down

0 comments on commit 6a50ea3

Please sign in to comment.