Skip to content

Commit

Permalink
[TF FE] Switch off TF1 While support totally (openvinotoolkit#20774)
Browse files Browse the repository at this point in the history
* [TF FE] Switch off TF1 While support totally

This is a total switch off due to GPU limitation

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>

* Need additional fallback in Enter to avoid shapes problem

* Disable tests with While op

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>

* Disable layer test for TF1 While

* Remove extra spaces

---------

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
  • Loading branch information
rkazants authored Oct 31, 2023
1 parent 38cd138 commit 38b6092
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 3 deletions.
3 changes: 3 additions & 0 deletions src/frontends/tensorflow/src/op/enter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ OutputVector translate_enter_op(const NodeContext& node) {
auto data = node.get_input(0);
auto frame_name = node.get_attribute<string>("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<Enter>(data, frame_name, node.get_decoder());
set_node_name(node.get_name(), enter_node);

Expand Down
3 changes: 3 additions & 0 deletions src/frontends/tensorflow/src/op/loop_cond.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ 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<LoopCond>(input, node.get_decoder());
set_node_name(node.get_name(), loop_cond_node);

Expand Down
2 changes: 1 addition & 1 deletion src/frontends/tensorflow/tests/convert_unsupported.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ TEST(FrontEndConvertModelTest, test_unsupported_tf1_while_and_incorrect_less_tra
}
}

TEST(FrontEndConvertModelTest, conversion_with_unknown_exception) {
TEST(FrontEndConvertModelTest, DISABLED_conversion_with_unknown_exception) {
shared_ptr<Model> model = nullptr;
try {
auto conv_ext =
Expand Down
4 changes: 2 additions & 2 deletions tests/layer_tests/tensorflow_tests/test_tf_While.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def body(x, y):
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),
dict(y_shape=[2, 1, 4], data_type=np.int32, lower_control_flow=True)
pytest.param(dict(y_shape=[2, 1, 4], data_type=np.int32, lower_control_flow=True), marks=pytest.mark.xfail(reason="123651"))
]

@pytest.mark.parametrize("params", test_data_basic)
Expand Down Expand Up @@ -110,7 +110,7 @@ def body(x, y):
test_data_basic = [
dict(y_shape=[2, 3], lower_control_flow=False),
dict(y_shape=[2, 1, 4], lower_control_flow=False),
dict(y_shape=[2, 1, 4], lower_control_flow=True)
pytest.param(dict(y_shape=[2, 1, 4], lower_control_flow=True), marks=pytest.mark.xfail(reason="123651"))
]

@pytest.mark.parametrize("params", test_data_basic)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ def test_conversion_tf1_while_default(self):
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)
Expand Down

0 comments on commit 38b6092

Please sign in to comment.