Skip to content

Commit

Permalink
[GPU]: SearchSorted: Added hack to properly handle inputs for searchs…
Browse files Browse the repository at this point in the history
…orted.
  • Loading branch information
pkowalc1 committed Nov 15, 2024
1 parent 8f8c333 commit a7f3a5e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/plugins/intel_gpu/src/plugin/program_builder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include "openvino/op/variadic_split.hpp"
#include "openvino/op/lstm_cell.hpp"
#include "openvino/op/loop.hpp"
#include "openvino/op/search_sorted.hpp"

#include "intel_gpu/plugin/common_utils.hpp"
#include "intel_gpu/plugin/program_builder.hpp"
Expand Down Expand Up @@ -349,6 +350,12 @@ bool ProgramBuilder::requires_new_shape_infer(const std::shared_ptr<ov::Node>& o
return true;
}

// HACK: SearchSorted has specific shape requirements.
// E.g. static input shapes: sorted:[8], values:[2,3,4] are prefectly fine,
// but sorted:[8,1,1,1], values:[2,3,4,1] is not valid.
if (ov::is_type<ov::op::v15::SearchSorted>(op))
return true;

if (ov::is_type<ov::op::v5::Loop>(op)) {
const auto body_function = std::static_pointer_cast<ov::op::v5::Loop>(op)->get_function();
if (body_function->is_dynamic())
Expand Down

0 comments on commit a7f3a5e

Please sign in to comment.