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

Broadcast: symbol propagation #27357

Merged
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions src/core/include/openvino/op/util/broadcast_base.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ class OPENVINO_API BroadcastBase : public Op {

bool evaluate_lower(TensorVector& outputs) const override;
bool evaluate_upper(TensorVector& outputs) const override;
bool evaluate_symbol(ov::TensorSymbolVector& output_symbols) const override;

PartialShape get_result_shape_pdpd(const PartialShape& arg0_shape,
const PartialShape& target_shape,
Expand Down
7 changes: 7 additions & 0 deletions src/core/src/op/util/broadcast_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -471,3 +471,10 @@ bool ov::op::util::BroadcastBase::evaluate_upper(ov::TensorVector& output_values
return false;
return default_upper_bound_evaluator(this, output_values);
}

bool ov::op::util::BroadcastBase::evaluate_symbol(ov::TensorSymbolVector& output_symbols) const {
if (!input_value(1).get_tensor().has_and_set_bound() ||
(get_input_size() > 2 && !input_value(2).get_tensor().has_and_set_bound()))
return false;
return default_symbol_evaluator(this, {0}, output_symbols);
}
Loading