Skip to content

Commit

Permalink
[dGPU] avoid strided_slice to executed in cpu
Browse files Browse the repository at this point in the history
  • Loading branch information
riverlijunjie committed Jul 17, 2024
1 parent b8ba903 commit f933ddf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include "reshape_inst.h"
#include "eltwise_inst.h"
#include "select_inst.h"
#include "strided_slice_inst.h"
#include "gather_inst.h"
#include "pass_manager.h"

Expand Down Expand Up @@ -107,7 +108,7 @@ void mark_shape_of_subgraphs::mark_node(program_node& node) {
// Update impl if needed
const auto default_subgraph_impl = impl_types::cpu;
if (_update_impls)
if (!node.is_type<reshape>())
if (!node.is_type<reshape>() && !node.is_type<strided_slice>())
node.set_preferred_impl_type(default_subgraph_impl);
}

Expand Down
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 @@ -1516,7 +1516,7 @@ impl_types layout_optimizer::get_preferred_impl_type(program_node& node, format
if (forced_impl != impl_types::any)
return forced_impl;

if (node.is_in_shape_of_subgraph() && !node.is_type<reshape>())
if (node.is_in_shape_of_subgraph() && !node.is_type<reshape>() && !node.is_type<strided_slice>())
return impl_types::cpu;

if (!_forcing_map.empty() && _forcing_map.count(node.id()) != 0) {
Expand Down

0 comments on commit f933ddf

Please sign in to comment.