Skip to content

Commit

Permalink
LP Transformation tests use API 2.0 (openvinotoolkit#21677)
Browse files Browse the repository at this point in the history
* use ov::test::SubgraphBaseTest base for LayerTransformation

* fix Run -> run

* fix LayerTestsCommon::getRuntimeInfo()

* continue fixes

* add init_input_shapes; remove GenerateInput

* change generate FakeQuantize function, but it doesnt work

* added thresholds

* fix thresholds gpu func tests

* fix cast_vector cpu_func_tests

* generate_inputs for non-scalar; fix thresholds

* fix thresholds

* cleanup

* cleanup

* fix problem with skipped tests and error no model compiled

* cleanup

* code review fixes: remove InferenceEngine::

* cleanup InferenceEngine

* use ov instead ov ngraph

* code review: use OPENVINO_ASSERT instead of IE_ASSERT

* fix gpu func tests InferenceEngine

* getTestCaseNameByParams -> get_test_case_name_by_params; some ngraph -> ov

* code review: cleanups

* code review: fix headers

* fix ngraph -> ov

* rename camel style to snake

* remove/fix ngraph includes

* use static_partial_shapes_to_test_representation

* move generate_inputs.cpp aux functions to anon namespace

* code review fix

* ci fixes

* code review: refactor get_runtime_precision methods

* refactor get_fq_scalar_range

* fixes after rebase

* add windows failures to skip list

* Apply suggestions from code review

Co-authored-by: Evgenya Nugmanova <[email protected]>

* Update src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/fuse_multiply_to_fq_transformation.cpp

Co-authored-by: Evgenya Nugmanova <[email protected]>

* Update src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/fuse_subtract_to_fq_transformation.cpp

Co-authored-by: Evgenya Nugmanova <[email protected]>

---------

Co-authored-by: Ivan Tikhonov <[email protected]>
Co-authored-by: Evgenya Nugmanova <[email protected]>
  • Loading branch information
3 people authored Jan 18, 2024
1 parent a76dabd commit 0dc2dc5
Show file tree
Hide file tree
Showing 271 changed files with 2,181 additions and 2,135 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,10 @@
#include "common_test_utils/test_constants.hpp"

using namespace LayerTestsDefinitions;
using namespace InferenceEngine::details;

namespace {
const std::vector<ngraph::element::Type> netPrecisions = {
ngraph::element::f32,
//ngraph::element::f16
const std::vector<ov::element::Type> netPrecisions = {
ov::element::f32
};

const std::vector<LayerTestsDefinitions::AddTestValues> params = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@
using namespace LayerTestsDefinitions;

namespace {
const std::vector<ngraph::element::Type> netPrecisions = {
ngraph::element::f32,
// ngraph::element::f16
const std::vector<ov::element::Type> netPrecisions = {
ov::element::f32
};

const std::vector<size_t> opsetVersions = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@
using namespace LayerTestsDefinitions;

namespace {
const std::vector<ngraph::element::Type> netPrecisions = {
ngraph::element::f32,
// ngraph::element::f16
const std::vector<ov::element::Type> netPrecisions = {
ov::element::f32
};

const std::vector<BatchToSpaceTransformationParam> params = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@
using namespace LayerTestsDefinitions;

namespace {
const std::vector<ngraph::element::Type> netPrecisions = {
ngraph::element::f32,
// ngraph::element::f16
const std::vector<ov::element::Type> netPrecisions = {
ov::element::f32
};

const std::vector<ov::pass::low_precision::LayerTransformation::Params> trasformationParamValues = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,10 @@
#include "common_test_utils/test_constants.hpp"

using namespace LayerTestsDefinitions;
using namespace InferenceEngine::details;

namespace {
const std::vector<ngraph::element::Type> precisions = {
ngraph::element::f32,
// ngraph::element::f16
const std::vector<ov::element::Type> precisions = {
ov::element::f32
};

const std::vector<ConcatTransformationTestValues> testValues = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@
using namespace LayerTestsDefinitions;

namespace {
const std::vector<ngraph::element::Type> netPrecisions = {
ngraph::element::f32,
// ngraph::element::f16
const std::vector<ov::element::Type> netPrecisions = {
ov::element::f32
};

const std::vector<ov::pass::low_precision::LayerTransformation::Params> trasformationParamValues = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@
using namespace LayerTestsDefinitions;

namespace {
const std::vector<ngraph::element::Type> netPrecisions = {
ngraph::element::f32,
// ngraph::element::f16
const std::vector<ov::element::Type> netPrecisions = {
ov::element::f32
};

const std::vector<ov::pass::low_precision::LayerTransformation::Params> trasformationParamValues = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,10 @@
#include "common_test_utils/test_constants.hpp"

using namespace LayerTestsDefinitions;
using namespace InferenceEngine::details;

namespace {
const std::vector<ngraph::element::Type> netPrecisions = {
ngraph::element::f32,
// ngraph::element::f16
const std::vector<ov::element::Type> netPrecisions = {
ov::element::f32
};

const std::vector<ov::pass::low_precision::LayerTransformation::Params> trasformationParamValues = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,10 @@
#include "common_test_utils/test_constants.hpp"

using namespace LayerTestsDefinitions;
using namespace InferenceEngine::details;

namespace {
const std::vector<ngraph::element::Type> precisions = {
ngraph::element::f32,
// ngraph::element::f16
const std::vector<ov::element::Type> precisions = {
ov::element::f32
};

const std::vector<ov::pass::low_precision::LayerTransformation::Params> trasformationParamValues = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@
using namespace LayerTestsDefinitions;

namespace {
const std::vector<ngraph::element::Type> netPrecisions = {
ngraph::element::f32,
// ngraph::element::f16
const std::vector<ov::element::Type> netPrecisions = {
ov::element::f32
};

const std::vector<ov::pass::low_precision::LayerTransformation::Params> trasformationParamValues = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
using namespace LayerTestsDefinitions;

namespace {
const std::vector<ngraph::element::Type> netPrecisions = {
ngraph::element::f32
const std::vector<ov::element::Type> netPrecisions = {
ov::element::f32
};

const std::vector<ov::pass::low_precision::LayerTransformation::Params> trasformationParamValues = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@
using namespace LayerTestsDefinitions;

namespace {
const std::vector<ngraph::element::Type> netPrecisions = {
ngraph::element::f32,
// ngraph::element::f16
const std::vector<ov::element::Type> netPrecisions = {
ov::element::f32
};

const std::vector<ov::pass::low_precision::LayerTransformation::Params> trasformationParamValues = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@
using namespace LayerTestsDefinitions;

namespace {
const std::vector<ngraph::element::Type> netPrecisions = {
ngraph::element::f32,
// ngraph::element::f16,
const std::vector<ov::element::Type> netPrecisions = {
ov::element::f32
};

const std::vector<ov::pass::low_precision::LayerTransformation::Params> trasformationParamValues = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,18 @@
#include "common_test_utils/test_constants.hpp"

using namespace LayerTestsDefinitions;
using namespace InferenceEngine::details;

namespace {
const std::vector<ngraph::element::Type> precisions = {
ngraph::element::f32,
// ngraph::element::f16
const std::vector<ov::element::Type> precisions = {
ov::element::f32
};

const std::vector<ov::op::v0::DepthToSpace::DepthToSpaceMode> modes = {
ov::op::v0::DepthToSpace::DepthToSpaceMode::BLOCKS_FIRST,
ov::op::v0::DepthToSpace::DepthToSpaceMode::DEPTH_FIRST
};

const std::vector<ngraph::PartialShape> inputShapesBS2 = {
const std::vector<ov::PartialShape> inputShapesBS2 = {
{1, 4, 3, 3}, {2, 16, 5, 4}
};

Expand All @@ -35,7 +33,7 @@ const auto DepthToSpaceBS2 = ::testing::Combine(

INSTANTIATE_TEST_SUITE_P(LPT_BS2, DepthToSpaceTransformation, DepthToSpaceBS2, DepthToSpaceTransformation::getTestCaseName);

const std::vector<ngraph::PartialShape> inputShapesBS3 = {
const std::vector<ov::PartialShape> inputShapesBS3 = {
{1, 9, 3, 3}, {2, 27, 5, 4}
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@
#include "common_test_utils/test_constants.hpp"

using namespace LayerTestsDefinitions;
using namespace InferenceEngine::details;

namespace {
const std::vector<ngraph::element::Type> netPrecisions = {
ngraph::element::f32,
const std::vector<ov::element::Type> netPrecisions = {
ov::element::f32
};

const std::vector<std::string> elementwiseTypes = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include <gtest/gtest.h>

using namespace LayerTestsDefinitions;
using namespace InferenceEngine::details;

namespace {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,10 @@
#include "common_test_utils/test_constants.hpp"

using namespace LayerTestsDefinitions;
using namespace InferenceEngine::details;

namespace {
const std::vector<ngraph::element::Type> precisions = {
ngraph::element::f32
const std::vector<ov::element::Type> precisions = {
ov::element::f32
};

const std::vector<ov::pass::low_precision::LayerTransformation::Params> trasformationParamValues = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,10 @@
#include "common_test_utils/test_constants.hpp"

using namespace LayerTestsDefinitions;
using namespace InferenceEngine::details;

namespace {
const std::vector<ngraph::element::Type> precisions = {
ngraph::element::f32
const std::vector<ov::element::Type> precisions = {
ov::element::f32
};

const std::vector<ov::pass::low_precision::LayerTransformation::Params> trasformationParamValues = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@ using namespace LayerTestsDefinitions;
using namespace ov::pass::low_precision;

namespace {
const std::vector<ngraph::element::Type> netPrecisions = {
ngraph::element::f32,
// ngraph::element::f16
const std::vector<ov::element::Type> netPrecisions = {
ov::element::f32
};

const std::vector<ov::pass::low_precision::LayerTransformation::Params> trasformationParamValues = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@ using namespace LayerTestsDefinitions;
using namespace ov::pass::low_precision;

namespace {
const std::vector<ngraph::element::Type> netPrecisions = {
ngraph::element::f32,
// ngraph::element::f16
const std::vector<ov::element::Type> netPrecisions = {
ov::element::f32
};

const std::vector<LayerTransformation::Params> trasformationParamValues = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@ using namespace LayerTestsDefinitions;
using namespace ov::pass::low_precision;

namespace {
const std::vector<ngraph::element::Type> netPrecisions = {
ngraph::element::f32,
// ngraph::element::f16
const std::vector<ov::element::Type> netPrecisions = {
ov::element::f32
};

const std::vector<LayerTransformation::Params> trasformationParamValues = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ using namespace LayerTestsDefinitions;
using namespace ov::pass::low_precision;

namespace {
const std::vector<ngraph::element::Type> netPrecisions = {
ngraph::element::f32,
ngraph::element::f16
const std::vector<ov::element::Type> netPrecisions = {
ov::element::f32,
ov::element::f16
};

const std::vector<LayerTransformation::Params> trasformationParamValues = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,10 @@
#include "common_test_utils/test_constants.hpp"

using namespace LayerTestsDefinitions;
using namespace InferenceEngine::details;

namespace {
const std::vector<ngraph::element::Type> netPrecisions = {
ngraph::element::f32,
// ngraph::element::f16
const std::vector<ov::element::Type> netPrecisions = {
ov::element::f32
};

const std::vector<MatMulShapes> shapes = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@
#include "low_precision_transformations/fuse_convert_transformation.hpp"

using namespace LayerTestsDefinitions;
using namespace InferenceEngine::details;

namespace {
const std::vector<element::Type> precisions = {
element::f32
const std::vector<ov::element::Type> precisions = {
ov::element::f32
};

const std::vector< ngraph::PartialShape > inputAndQuantizationShapes = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#include <gtest/gtest.h>

using namespace LayerTestsDefinitions;
using namespace InferenceEngine::details;

namespace {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ using namespace LayerTestsDefinitions;
using namespace ov::pass::low_precision;

namespace {
const std::vector<ngraph::element::Type> netPrecisions = {
ngraph::element::f32
const std::vector<ov::element::Type> netPrecisions = {
ov::element::f32
};

const std::vector<LayerTransformation::Params> trasformationParamValues = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
#include <gtest/gtest.h>

using namespace LayerTestsDefinitions;
using namespace InferenceEngine::details;
using namespace ngraph;

namespace {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
#include <gtest/gtest.h>

using namespace LayerTestsDefinitions;
using namespace InferenceEngine::details;
using namespace ngraph;

namespace {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
using namespace LayerTestsDefinitions;

namespace {
const std::vector<ngraph::element::Type> precisions = {
ngraph::element::f32,
const std::vector<ov::element::Type> precisions = {
ov::element::f32
};

const std::vector<int> opset_version = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@ using namespace LayerTestsDefinitions;
using namespace ov::pass::low_precision;

namespace {
const std::vector<ngraph::element::Type> netPrecisions = {
ngraph::element::f32,
// ngraph::element::f16
const std::vector<ov::element::Type> netPrecisions = {
ov::element::f32
};

const std::vector<ngraph::PartialShape> dimensions = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
using namespace LayerTestsDefinitions;

namespace {
const std::vector<ngraph::element::Type> netPrecisions = {
ngraph::element::f32
const std::vector<ov::element::Type> netPrecisions = {
ov::element::f32
};

const std::vector<ov::pass::low_precision::LayerTransformation::Params> trasformationParamValues = {
Expand Down
Loading

0 comments on commit 0dc2dc5

Please sign in to comment.