From 26c9c41b8eab9b5e4dc7070c7620262b778998f8 Mon Sep 17 00:00:00 2001 From: Roman Kazantsev Date: Tue, 31 Oct 2023 22:53:35 +0400 Subject: [PATCH] Revert "[TF FE] Switch off TF1 While support totally (#20774)" (#20800) This reverts commit 38b60921203aee035903d40dfdc2d7db0dbed03f. --- src/frontends/tensorflow/src/op/enter.cpp | 3 --- src/frontends/tensorflow/src/op/loop_cond.cpp | 3 --- src/frontends/tensorflow/tests/convert_unsupported.cpp | 2 +- tests/layer_tests/tensorflow_tests/test_tf_While.py | 4 ++-- tools/mo/unit_tests/moc_tf_fe/conversion_basic_models_test.py | 1 - 5 files changed, 3 insertions(+), 10 deletions(-) diff --git a/src/frontends/tensorflow/src/op/enter.cpp b/src/frontends/tensorflow/src/op/enter.cpp index 190f6adebec..c0719f83e36 100644 --- a/src/frontends/tensorflow/src/op/enter.cpp +++ b/src/frontends/tensorflow/src/op/enter.cpp @@ -22,9 +22,6 @@ OutputVector translate_enter_op(const NodeContext& node) { auto data = node.get_input(0); auto frame_name = node.get_attribute("frame_name"); - // TODO 123651: remove this fallback to the legacy FE once GPU fixes dynamism for Loop operation - TENSORFLOW_OP_VALIDATION(node, false, "Fallback to legacy FE: Switch off TF1 While support due to GPU limitation"); - auto enter_node = make_shared(data, frame_name, node.get_decoder()); set_node_name(node.get_name(), enter_node); diff --git a/src/frontends/tensorflow/src/op/loop_cond.cpp b/src/frontends/tensorflow/src/op/loop_cond.cpp index 3b16518456a..286192a017f 100644 --- a/src/frontends/tensorflow/src/op/loop_cond.cpp +++ b/src/frontends/tensorflow/src/op/loop_cond.cpp @@ -22,9 +22,6 @@ OutputVector translate_loop_cond_op(const NodeContext& node) { default_op_checks(node, 1, {"LoopCond"}); auto input = node.get_input(0); - // TODO 123651: remove this fallback to the legacy FE once GPU fixes dynamism for Loop operation - TENSORFLOW_OP_VALIDATION(node, false, "Fallback to legacy FE: Switch off TF1 While support due to GPU limitation"); - auto loop_cond_node = make_shared(input, node.get_decoder()); set_node_name(node.get_name(), loop_cond_node); diff --git a/src/frontends/tensorflow/tests/convert_unsupported.cpp b/src/frontends/tensorflow/tests/convert_unsupported.cpp index aef4a0bea9d..7d9a83045b5 100644 --- a/src/frontends/tensorflow/tests/convert_unsupported.cpp +++ b/src/frontends/tensorflow/tests/convert_unsupported.cpp @@ -154,7 +154,7 @@ TEST(FrontEndConvertModelTest, test_unsupported_tf1_while_and_incorrect_less_tra } } -TEST(FrontEndConvertModelTest, DISABLED_conversion_with_unknown_exception) { +TEST(FrontEndConvertModelTest, conversion_with_unknown_exception) { shared_ptr model = nullptr; try { auto conv_ext = diff --git a/tests/layer_tests/tensorflow_tests/test_tf_While.py b/tests/layer_tests/tensorflow_tests/test_tf_While.py index cd66024d1e8..2a112700f30 100644 --- a/tests/layer_tests/tensorflow_tests/test_tf_While.py +++ b/tests/layer_tests/tensorflow_tests/test_tf_While.py @@ -51,7 +51,7 @@ class TestWhile(CommonTFLayerTest): test_data_basic = [ dict(y_shape=[2, 3], data_type=np.int32, lower_control_flow=False), dict(y_shape=[2, 1, 4], data_type=np.int32, lower_control_flow=False), - pytest.param(dict(y_shape=[2, 1, 4], data_type=np.int32, lower_control_flow=True), marks=pytest.mark.xfail(reason="123651")) + dict(y_shape=[2, 1, 4], data_type=np.int32, lower_control_flow=True) ] @pytest.mark.parametrize("params", test_data_basic) @@ -110,7 +110,7 @@ class TestWhileShapeVariant(CommonTFLayerTest): test_data_basic = [ dict(y_shape=[2, 3], lower_control_flow=False), dict(y_shape=[2, 1, 4], lower_control_flow=False), - pytest.param(dict(y_shape=[2, 1, 4], lower_control_flow=True), marks=pytest.mark.xfail(reason="123651")) + dict(y_shape=[2, 1, 4], lower_control_flow=True) ] @pytest.mark.parametrize("params", test_data_basic) diff --git a/tools/mo/unit_tests/moc_tf_fe/conversion_basic_models_test.py b/tools/mo/unit_tests/moc_tf_fe/conversion_basic_models_test.py index 9902f18ad3d..26ea01b77d6 100644 --- a/tools/mo/unit_tests/moc_tf_fe/conversion_basic_models_test.py +++ b/tools/mo/unit_tests/moc_tf_fe/conversion_basic_models_test.py @@ -239,7 +239,6 @@ class TestMoFreezePlaceholderTFFE(unittest.TestCase): self.basic("ctc_model_based.pbtxt", None, None, None, None, None, None, True, True, False, False) - @unittest.skip("123651: enable when GPU fixes dynamism in Loop operation") def test_conversion_tf1_while_use_new_frontend(self): self.basic("ctc_model_based.pbtxt", None, None, None, None, None, None, True, True, True, False)