[TF FE] Remove export of API for helper transformations (#13484)

* [TF FE] Remove export API for helper transformation

Also, it skips layer tests for SegmentSum and DynamicPartition in case legacy frontend

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

* Split test suites for DynamicPartition

* Update CMake to link additional sources for the tests

* Update Cmake to fix unresolved symbol get_message_prefix_tf

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
This commit is contained in:
Roman Kazantsev 2022-10-14 12:17:16 +03:00 committed by GitHub
parent 22d08de791
commit 3b642e2465
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 15 additions and 3 deletions

View File

@ -24,7 +24,10 @@ endif()
add_library(openvino_tensorflow_frontend_static_tests STATIC EXCLUDE_FROM_ALL
helper_transforms/block_lstm_replacer.cpp
helper_transforms/embedding_segments_feature_fusing.cpp
helper_transforms/gru_block_cell_replacer.cpp
helper_transforms/unique_replacer.cpp
pass/transpose_sinking.cpp
exception.cpp
openvino_conversions.cpp
utils.cpp)

View File

@ -18,7 +18,7 @@ namespace pass {
// This transformation replaces BlockLSTM with such outputs as concatenated hidden states
// and cell state from the last time step.
class TENSORFLOW_API BlockLSTMReplacer : public ov::pass::MatcherPass {
class BlockLSTMReplacer : public ov::pass::MatcherPass {
public:
OPENVINO_RTTI("ov::frontend::tensorflow::pass::BlockLSTMReplacer");
BlockLSTMReplacer();

View File

@ -17,7 +17,7 @@ namespace tensorflow {
namespace pass {
// This transformation handles GRUBlockCell with just one output - hidden state
class TENSORFLOW_API GRUBlockCellReplacer : public ov::pass::MatcherPass {
class GRUBlockCellReplacer : public ov::pass::MatcherPass {
public:
OPENVINO_RTTI("ov::frontend::tensorflow::pass::GRUBlockCellReplacer");
GRUBlockCellReplacer();

View File

@ -17,7 +17,7 @@ namespace tensorflow {
namespace pass {
// This transformation expresses Unique with a sub-graph of OpenVINO operations
class TENSORFLOW_API UniqueReplacer : public ov::pass::MatcherPass {
class UniqueReplacer : public ov::pass::MatcherPass {
public:
OPENVINO_RTTI("ov::frontend::tensorflow::pass::UniqueReplacer");
UniqueReplacer();

View File

@ -45,6 +45,8 @@ class TestDynamicPartition(CommonTFLayerTest):
@pytest.mark.nightly
def test_dynamic_partition_basic(self, params, ie_device, precision, ir_version, temp_dir,
use_new_frontend, use_old_api):
if not use_new_frontend:
pytest.skip("DynamicPartition operation is not supported via legacy frontend.")
self._test(*self.create_dynamic_partition_net(**params),
ie_device, precision, ir_version, temp_dir=temp_dir,
use_new_frontend=use_new_frontend, use_old_api=use_old_api)
@ -58,6 +60,8 @@ class TestDynamicPartition(CommonTFLayerTest):
@pytest.mark.nightly
def test_dynamic_partition_other_types(self, params, ie_device, precision, ir_version, temp_dir,
use_new_frontend, use_old_api):
if not use_new_frontend:
pytest.skip("DynamicPartition operation is not supported via legacy frontend.")
self._test(*self.create_dynamic_partition_net(**params),
ie_device, precision, ir_version, temp_dir=temp_dir,
use_new_frontend=use_new_frontend, use_old_api=use_old_api)

View File

@ -42,6 +42,8 @@ class TestSegmentSum(CommonTFLayerTest):
@pytest.mark.nightly
def test_segment_sum_basic(self, params, ie_device, precision, ir_version, temp_dir,
use_new_frontend, use_old_api):
if not use_new_frontend:
pytest.skip("SegmentSum operation is not supported via legacy frontend.")
self._test(*self.create_segment_sum_net(**params),
ie_device, precision, ir_version, temp_dir=temp_dir,
use_new_frontend=use_new_frontend, use_old_api=use_old_api)
@ -57,6 +59,8 @@ class TestSegmentSum(CommonTFLayerTest):
@pytest.mark.nightly
def test_segment_sum_different_types(self, params, ie_device, precision, ir_version, temp_dir,
use_new_frontend, use_old_api):
if not use_new_frontend:
pytest.skip("SegmentSum operation is not supported via legacy frontend.")
self._test(*self.create_segment_sum_net(**params),
ie_device, precision, ir_version, temp_dir=temp_dir,
use_new_frontend=use_new_frontend, use_old_api=use_old_api)

View File

@ -30,6 +30,7 @@ class TestUnique(CommonTFLayerTest):
return tf_net, None
test_data_basic = [
dict(x_shape=[1], data_type=tf.float32, out_idx=tf.int32),
dict(x_shape=[50], data_type=tf.float32, out_idx=tf.int32),
dict(x_shape=[100], data_type=tf.float32, out_idx=tf.int64),
]