From 73ed80413447ede936f14e537e8f7ab06e624a5e Mon Sep 17 00:00:00 2001 From: Maxim Vafin Date: Fri, 14 Jul 2023 13:02:02 +0200 Subject: [PATCH] Fix typo in align types function (#18474) --- src/frontends/pytorch/src/utils.cpp | 2 +- .../layer_tests/pytorch_tests/test_min_max.py | 20 ++++++------------- 2 files changed, 7 insertions(+), 15 deletions(-) diff --git a/src/frontends/pytorch/src/utils.cpp b/src/frontends/pytorch/src/utils.cpp index 1f364895e44024..7a24d9e447c647 100644 --- a/src/frontends/pytorch/src/utils.cpp +++ b/src/frontends/pytorch/src/utils.cpp @@ -380,7 +380,7 @@ void align_eltwise_input_types(const NodeContext& context, Output& lhs, Ou if (otype != lhs_type) { lhs = context.mark_node(std::make_shared(lhs, otype)); } - if (otype != lhs_type) { + if (otype != rhs_type) { rhs = context.mark_node(std::make_shared(rhs, otype)); } return; diff --git a/tests/layer_tests/pytorch_tests/test_min_max.py b/tests/layer_tests/pytorch_tests/test_min_max.py index e962b48b72b3ab..211cf76d06a472 100644 --- a/tests/layer_tests/pytorch_tests/test_min_max.py +++ b/tests/layer_tests/pytorch_tests/test_min_max.py @@ -123,13 +123,9 @@ def forward(self, x: float, y: float): {"first_input": 0, "second_input": 1, "dtype": "int"}, {"first_input": 1, "second_input": 1, "dtype": "int"}, {"first_input": 2, "second_input": 1, "dtype": "int"}, - # is not supported by OV - pytest.param({"first_input": 0, "second_input": 1, - "dtype": "bool"}, marks=pytest.mark.xfail), - pytest.param({"first_input": 1, "second_input": 1, - "dtype": "bool"}, marks=pytest.mark.xfail), - pytest.param({"first_input": 2, "second_input": 1, - "dtype": "bool"}, marks=pytest.mark.xfail), + {"first_input": 0, "second_input": 1, "dtype": "bool"}, + {"first_input": 1, "second_input": 1, "dtype": "bool"}, + {"first_input": 2, "second_input": 1, "dtype": "bool"}, ]) @pytest.mark.nightly @pytest.mark.precommit @@ -187,13 +183,9 @@ def forward(self, x: float, y: float): {"first_input": 0, "second_input": 1, "dtype": "int"}, {"first_input": 1, "second_input": 1, "dtype": "int"}, {"first_input": 2, "second_input": 1, "dtype": "int"}, - # is not supported by OV - pytest.param({"first_input": 0, "second_input": 1, - "dtype": "bool"}, marks=pytest.mark.xfail), - pytest.param({"first_input": 1, "second_input": 1, - "dtype": "bool"}, marks=pytest.mark.xfail), - pytest.param({"first_input": 2, "second_input": 1, - "dtype": "bool"}, marks=pytest.mark.xfail), + {"first_input": 0, "second_input": 1, "dtype": "bool"}, + {"first_input": 1, "second_input": 1, "dtype": "bool"}, + {"first_input": 2, "second_input": 1, "dtype": "bool"}, ]) @pytest.mark.nightly @pytest.mark.precommit