Skip to content

Commit 7f86fad

Browse files
[OVEP] Fix UnsupportedOpMode logic for Reshape
Assumptions about number of inputs to Reshape nodes were causing crashes. The check has been adjusted to be functional with Reshape only having one input.
1 parent a95ed23 commit 7f86fad

File tree

1 file changed

+2
-1
lines changed
  • onnxruntime/core/providers/openvino/ov_versions

1 file changed

+2
-1
lines changed

onnxruntime/core/providers/openvino/ov_versions/data_ops.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,8 @@ void DataOps::populate_op_mode_supported() {
420420
UnsupportedOpMode obj = {{V_2023_1, V_2023_2, V_2023_3, V_2024_0, V_2024_1, V_2024_2,
421421
V_2024_3, V_2024_4, V_2024_5, V_2024_6, V_2025_0, V_2025_1},
422422
[this](const Node* node, const InitializedTensorSet&) {
423-
const auto& input_arg = node->InputDefs()[1];
423+
const auto& input_args = node->InputDefs();
424+
const auto& input_arg = (input_args.size() > 1) ? input_args[1] : input_args[0];
424425
auto shape = input_arg->Shape();
425426
// Reshape op with empty dim is Rejected for Myriad
426427
// [TODO] Is this condition required anymore with Myriad removed?

0 commit comments

Comments
 (0)