diff --git a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/subgraph_tests/quantized_mat_mul.cpp b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/subgraph_tests/quantized_mat_mul.cpp index 2c28b919af1..d8dc2eeb431 100644 --- a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/subgraph_tests/quantized_mat_mul.cpp +++ b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/subgraph_tests/quantized_mat_mul.cpp @@ -7,20 +7,19 @@ #include "subgraph_tests/quantized_mat_mul.hpp" -using namespace SubgraphTestsDefinitions; -using namespace ngraph::helpers; +using namespace ov::test; namespace { -const std::vector netPrecisions = { - InferenceEngine::Precision::FP32 +const std::vector netPrecisions = { + ov::element::f32 }; -const std::vector> shapesA = { +const std::vector shapesA = { {1, 4, 5, 6} }; -const std::vector> shapesB = { +const std::vector shapesB = { {1, 4, 6, 4} }; @@ -43,14 +42,15 @@ const std::vector ranges_i32 = { const std::vector levels_8 = {256}; const std::vector levels_16 = {65536}; const std::vector levels_32 = {4294967296}; -const std::vector granularity = {QuantizationGranularity::Pertensor}; +const std::vector granularity = { + ov::test::utils::QuantizationGranularity::Pertensor}; const auto quantParams_i8 = ::testing::Combine( ::testing::ValuesIn(levels_8), ::testing::ValuesIn(ranges_u8), ::testing::ValuesIn(ranges_i8), ::testing::ValuesIn(granularity), - ::testing::Values(InferenceEngine::Precision::I8) + ::testing::Values(ov::element::i8) ); const auto quantParams_u8 = ::testing::Combine( @@ -58,7 +58,7 @@ const auto quantParams_u8 = ::testing::Combine( ::testing::ValuesIn(ranges_u8), ::testing::ValuesIn(ranges_u8), ::testing::ValuesIn(granularity), - ::testing::Values(InferenceEngine::Precision::U8) + ::testing::Values(ov::element::u8) ); const auto quantParams_i16 = ::testing::Combine( @@ -66,7 +66,7 @@ const auto quantParams_i16 = ::testing::Combine( ::testing::ValuesIn(ranges_i32), ::testing::ValuesIn(ranges_i16), ::testing::ValuesIn(granularity), - ::testing::Values(InferenceEngine::Precision::I16) + ::testing::Values(ov::element::i16) ); const auto quantParams_i32 = ::testing::Combine( @@ -74,7 +74,7 @@ const auto quantParams_i32 = ::testing::Combine( ::testing::ValuesIn(ranges_i32), ::testing::ValuesIn(ranges_i32), ::testing::ValuesIn(granularity), - ::testing::Values(InferenceEngine::Precision::I32) + ::testing::Values(ov::element::i32) ); INSTANTIATE_TEST_SUITE_P(smoke_QuantMatMul_i8i8, QuantMatMulTest, diff --git a/src/tests/functional/plugin/shared/include/subgraph_tests/quantized_mat_mul.hpp b/src/tests/functional/plugin/shared/include/subgraph_tests/quantized_mat_mul.hpp index 4313a00cde5..fe75b63c25d 100644 --- a/src/tests/functional/plugin/shared/include/subgraph_tests/quantized_mat_mul.hpp +++ b/src/tests/functional/plugin/shared/include/subgraph_tests/quantized_mat_mul.hpp @@ -6,10 +6,12 @@ #include "shared_test_classes/subgraph/quantized_mat_mul.hpp" -namespace SubgraphTestsDefinitions { +namespace ov { +namespace test { TEST_P(QuantMatMulTest, CompareWithRefs) { - Run(); + run(); }; -} // namespace SubgraphTestsDefinitions +} // namespace test +} // namespace ov diff --git a/src/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/quantized_mat_mul.hpp b/src/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/quantized_mat_mul.hpp index 8187c864575..5350791bef8 100644 --- a/src/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/quantized_mat_mul.hpp +++ b/src/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/quantized_mat_mul.hpp @@ -4,15 +4,11 @@ #pragma once -#include -#include -#include -#include -#include +#include "common_test_utils/test_enums.hpp" +#include "shared_test_classes/base/ov_subgraph.hpp" -#include "shared_test_classes/base/layer_test_utils.hpp" - -namespace SubgraphTestsDefinitions { +namespace ov { +namespace test { typedef std::pair QuantRange; @@ -21,22 +17,23 @@ typedef std::tuple< QuantRange, QuantRange, ov::test::utils::QuantizationGranularity, - InferenceEngine::Precision> QuantParams; + ov::element::Type> QuantParams; typedef std::tuple< QuantParams, QuantParams, - InferenceEngine::Precision, - InferenceEngine::SizeVector, - InferenceEngine::SizeVector, - LayerTestsUtils::TargetDevice> QuantMatMulLayerTestParamsSet; + ov::element::Type, + ov::Shape, + ov::Shape, + std::string> QuantMatMulLayerTestParamsSet; -class QuantMatMulTest : public testing::WithParamInterface, virtual public LayerTestsUtils::LayerTestsCommon { +class QuantMatMulTest : public testing::WithParamInterface, virtual public ov::test::SubgraphBaseStaticTest { public: - static std::string getTestCaseName(const testing::TestParamInfo &obj); + static std::string getTestCaseName(const testing::TestParamInfo& obj); protected: void SetUp() override; }; -} // namespace SubgraphTestsDefinitions +} // namespace test +} // namespace ov diff --git a/src/tests/functional/shared_test_classes/src/subgraph/quantized_mat_mul.cpp b/src/tests/functional/shared_test_classes/src/subgraph/quantized_mat_mul.cpp index 1226451120d..e88de482532 100644 --- a/src/tests/functional/shared_test_classes/src/subgraph/quantized_mat_mul.cpp +++ b/src/tests/functional/shared_test_classes/src/subgraph/quantized_mat_mul.cpp @@ -5,27 +5,28 @@ #include "shared_test_classes/subgraph/quantized_mat_mul.hpp" #include "ov_models/builders.hpp" -namespace SubgraphTestsDefinitions { +namespace ov { +namespace test { std::string QuantMatMulTest::getTestCaseName(const testing::TestParamInfo &obj) { QuantParams quantParams0; QuantParams quantParams1; - InferenceEngine::Precision netPrecision; - InferenceEngine::SizeVector inputShape0; - InferenceEngine::SizeVector inputShape1; + ov::element::Type element_type; + ov::Shape inputShape0; + ov::Shape inputShape1; QuantRange inputRange0; QuantRange inputRange1; QuantRange outputRange0; QuantRange outputRange1; std::string targetDevice; - std::tie(quantParams0, quantParams1, netPrecision, inputShape0, inputShape1, targetDevice) = obj.param; + std::tie(quantParams0, quantParams1, element_type, inputShape0, inputShape1, targetDevice) = obj.param; size_t quantLevels0; size_t quantLevels1; ov::test::utils::QuantizationGranularity quantGranularity0; ov::test::utils::QuantizationGranularity quantGranularity1; - InferenceEngine::Precision fqPrec0; - InferenceEngine::Precision fqPrec1; + ov::element::Type fqPrec0; + ov::element::Type fqPrec1; std::tie(quantLevels0, inputRange0, outputRange0, quantGranularity0, fqPrec0) = quantParams0; std::tie(quantLevels1, inputRange1, outputRange1, quantGranularity1, fqPrec1) = quantParams1; @@ -40,9 +41,9 @@ std::string QuantMatMulTest::getTestCaseName(const testing::TestParamInfo(MatMul)}; + function = std::make_shared(results, params, "QuantMatMul"); } -} // namespace SubgraphTestsDefinitions +} // namespace test +} // namespace ov