Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GPU] Fix for is_user_cpu() function #21744

Merged
merged 1 commit into from
Dec 19, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions src/plugins/intel_gpu/src/graph/primitive_inst.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (C) 2018-2023 Intel Corporation

// SPDX-License-Identifier: Apache-2.0
//

#include "program_helpers.h"
#include "primitive_inst.h"
#include "data_inst.h"
Expand All @@ -28,6 +28,7 @@
#include "condition_inst.h"
#include "gather_inst.h"
#include "experimental_detectron_roi_feature_extractor_inst.hpp"
#include "non_max_suppression_inst.h"
Lyamin-Roman marked this conversation as resolved.
Show resolved Hide resolved
#include "implementation_map.hpp"
#include "graph_optimizer/prepare_buffer_fusing.h"

Expand Down Expand Up @@ -102,9 +103,9 @@ bool is_user_cpu(const program_node* user) {
}
return false;
}
if (auto impl = user->get_selected_impl())
return impl->is_cpu();
return false;
bool is_cpu = user->get_selected_impl() ? user->get_selected_impl()->is_cpu() :
user->get_preferred_impl_type() == impl_types::cpu;
return is_cpu;
}
bool has_cpu_user_not_shape_of(const program_node* user) {
if (user->can_be_optimized()) {
Expand Down
Loading