Skip to content

Commit 6a50ea3

Browse files
authored
[GPU] Using a cpu impl type for NMS in a dynamic case (#21648)
1 parent 88c8143 commit 6a50ea3

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/plugins/intel_gpu/src/graph/layout_optimizer.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1493,7 +1493,7 @@ impl_types layout_optimizer::get_preferred_impl_type(program_node& node, format
14931493
} else {
14941494
const auto scores_layout = nms_node.input_scores().get_output_layout();
14951495
if (scores_layout.is_dynamic()) {
1496-
preferred_impl = impl_types::ocl;
1496+
preferred_impl = impl_types::cpu;
14971497
} else {
14981498
const size_t kBatchNum = scores_layout.batch();
14991499
const size_t kClassNum = scores_layout.feature();

src/plugins/intel_gpu/src/graph/primitive_inst.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -1404,7 +1404,8 @@ memory::ptr primitive_inst::allocate_output(engine& _engine,
14041404

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

0 commit comments

Comments
 (0)