[TFC][TFL] Avoid ngraph in tensoflow common and lite parts (#17775)
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
This commit is contained in:
parent
28d2e77a92
commit
a6d3f9d093
@ -9,6 +9,7 @@ ov_add_test_target(
|
||||
ROOT ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
LINK_LIBRARIES
|
||||
gtest_main_manifest
|
||||
frontend_shared_test_classes
|
||||
openvino_tensorflow_common
|
||||
ADD_CLANG_FORMAT
|
||||
LABELS
|
||||
|
@ -6,14 +6,11 @@
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include <frontend/shared/include/utils.hpp>
|
||||
#include <openvino/frontend/manager.hpp>
|
||||
#include <openvino/opsets/opset9.hpp>
|
||||
#include <openvino/pass/manager.hpp>
|
||||
|
||||
#include "common_test_utils/ngraph_test_utils.hpp"
|
||||
#include "gtest/gtest.h"
|
||||
#include "conversion_with_reference.hpp"
|
||||
#include "helper_ops/block_lstm.hpp"
|
||||
#include "openvino/frontend/manager.hpp"
|
||||
#include "openvino/opsets/opset9.hpp"
|
||||
#include "openvino/pass/manager.hpp"
|
||||
|
||||
using namespace std;
|
||||
using namespace ov;
|
||||
@ -181,29 +178,29 @@ shared_ptr<Model> gen_model_ref(Dimension m_batch_size,
|
||||
|
||||
} // namespace
|
||||
|
||||
TEST_F(TransformationTestsF, BlockLSTMReplacerWithHiddenOutput) {
|
||||
TEST_F(FrontEndConversionWithReferenceTestsF, BlockLSTMReplacerWithHiddenOutput) {
|
||||
{
|
||||
function = gen_model(2, 10, 120, 20, 1.0f, -1.0f, false);
|
||||
model = gen_model(2, 10, 120, 20, 1.0f, -1.0f, false);
|
||||
manager.register_pass<BlockLSTMReplacer>();
|
||||
}
|
||||
{ function_ref = gen_model_ref(2, 10, 120, 20, 1.0f); }
|
||||
{ model_ref = gen_model_ref(2, 10, 120, 20, 1.0f); }
|
||||
}
|
||||
|
||||
TEST_F(TransformationTestsF, BlockLSTMReplacerWithHiddenOutputAndLastCellState) {
|
||||
TEST_F(FrontEndConversionWithReferenceTestsF, BlockLSTMReplacerWithHiddenOutputAndLastCellState) {
|
||||
{
|
||||
function = gen_model(2, 10, 120, 20, 1.0f, -1.0f, false, true);
|
||||
model = gen_model(2, 10, 120, 20, 1.0f, -1.0f, false, true);
|
||||
manager.register_pass<BlockLSTMReplacer>();
|
||||
}
|
||||
{ function_ref = gen_model_ref(2, 10, 120, 20, 1.0f, true); }
|
||||
{ model_ref = gen_model_ref(2, 10, 120, 20, 1.0f, true); }
|
||||
}
|
||||
|
||||
TEST_F(TransformationTestsF, BlockLSTMReplacerWithPeepHole) {
|
||||
TEST_F(FrontEndConversionWithReferenceTestsF, BlockLSTMReplacerWithPeepHole) {
|
||||
{
|
||||
function = gen_model(2, 10, 120, 20, 1.0f, -1.0f, true);
|
||||
model = gen_model(2, 10, 120, 20, 1.0f, -1.0f, true);
|
||||
manager.register_pass<BlockLSTMReplacer>();
|
||||
}
|
||||
{
|
||||
// the transformation is not applied for the peep hole case
|
||||
function_ref = gen_model(2, 10, 120, 20, 1.0f, -1.0f, true);
|
||||
model_ref = gen_model(2, 10, 120, 20, 1.0f, -1.0f, true);
|
||||
}
|
||||
}
|
||||
|
@ -6,14 +6,11 @@
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include <frontend/shared/include/utils.hpp>
|
||||
#include <openvino/frontend/manager.hpp>
|
||||
#include <openvino/opsets/opset9.hpp>
|
||||
#include <openvino/pass/manager.hpp>
|
||||
|
||||
#include "common_test_utils/ngraph_test_utils.hpp"
|
||||
#include "gtest/gtest.h"
|
||||
#include "conversion_with_reference.hpp"
|
||||
#include "helper_ops/gru_block_cell.hpp"
|
||||
#include "openvino/frontend/manager.hpp"
|
||||
#include "openvino/opsets/opset9.hpp"
|
||||
#include "openvino/pass/manager.hpp"
|
||||
|
||||
using namespace std;
|
||||
using namespace ov;
|
||||
@ -100,21 +97,21 @@ shared_ptr<Model> gen_model_ref(Dimension m_batch_size, int64_t m_hidden_size, D
|
||||
|
||||
} // namespace
|
||||
|
||||
TEST_F(TransformationTestsF, GRUBlockCellReplacerOneOutput) {
|
||||
TEST_F(FrontEndConversionWithReferenceTestsF, GRUBlockCellReplacerOneOutput) {
|
||||
{
|
||||
function = gen_model(2, 10, 120);
|
||||
model = gen_model(2, 10, 120);
|
||||
manager.register_pass<GRUBlockCellReplacer>();
|
||||
}
|
||||
{ function_ref = gen_model_ref(2, 10, 120); }
|
||||
{ model_ref = gen_model_ref(2, 10, 120); }
|
||||
}
|
||||
|
||||
TEST_F(TransformationTestsF, GRUBlockCellReplacerTwoOutputs) {
|
||||
TEST_F(FrontEndConversionWithReferenceTestsF, GRUBlockCellReplacerTwoOutputs) {
|
||||
{
|
||||
function = gen_model_with_two_outputs(2, 10, 120);
|
||||
model = gen_model_with_two_outputs(2, 10, 120);
|
||||
manager.register_pass<GRUBlockCellReplacer>();
|
||||
}
|
||||
{
|
||||
// transformation is not applied due to presence of the first output
|
||||
function_ref = gen_model_with_two_outputs(2, 10, 120);
|
||||
model_ref = gen_model_with_two_outputs(2, 10, 120);
|
||||
}
|
||||
}
|
||||
|
@ -6,7 +6,6 @@
|
||||
|
||||
#include "tf_utils.hpp"
|
||||
|
||||
using namespace ngraph;
|
||||
using namespace ov::frontend;
|
||||
|
||||
using TFLiteBasicTest = FrontEndBasicTest;
|
||||
|
@ -6,7 +6,6 @@
|
||||
|
||||
#include "tf_utils.hpp"
|
||||
|
||||
using namespace ngraph;
|
||||
using namespace ov::frontend;
|
||||
|
||||
using TFLiteConvertModelTest = FrontEndConvertModelTest;
|
||||
|
Loading…
Reference in New Issue
Block a user