[TF FE] Switch off TF1 While support totally (#20774)

* [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>
This commit is contained in:
Roman Kazantsev 2023-10-31 12:46:36 +04:00 committed by Alexander Nesterov
parent 261e570a81
commit 3d9ea15e92
5 changed files with 10 additions and 3 deletions

View File

@ -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);

View File

@ -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);

View File

@ -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 =

View File

@ -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),
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)
@ -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),
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)

View File

@ -239,6 +239,7 @@ 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)