diff --git a/src/plugins/intel_cpu/tests/functional/custom/subgraph_tests/src/denormal_check.cpp b/src/plugins/intel_cpu/tests/functional/custom/subgraph_tests/src/denormal_check.cpp index 306d61d26ee8d3..b98d4c61a1fb43 100644 --- a/src/plugins/intel_cpu/tests/functional/custom/subgraph_tests/src/denormal_check.cpp +++ b/src/plugins/intel_cpu/tests/functional/custom/subgraph_tests/src/denormal_check.cpp @@ -65,10 +65,10 @@ TEST_F(DenormalNullifyCheck, smoke_CPU_Denormal_Check) { constexpr unsigned denormalsCount = 15u; constexpr uint32_t denormalsRange = (0xffffffffu >> 9u) - 1; testing::internal::Random random(seed); - auto randomRange = NGraphFunctions::Utils::generateVector(elemsCount, 10, -10); + auto randomRange = ov::test::utils::generateVector(elemsCount, 10, -10); for (auto& interval : intervals) { - auto randomIndices = NGraphFunctions::Utils::generateVector(denormalsCount, interval.second, interval.first); + auto randomIndices = ov::test::utils::generateVector(denormalsCount, interval.second, interval.first); std::unordered_set randomIndexSet(randomIndices.begin(), randomIndices.end()); for (size_t i = 0; i < elemsCount; ++i) { if (randomIndexSet.count(i)) { diff --git a/src/plugins/intel_cpu/tests/functional/utils/fusing_test_utils.hpp b/src/plugins/intel_cpu/tests/functional/utils/fusing_test_utils.hpp index 860106b81d97a8..9b240df9232b9c 100644 --- a/src/plugins/intel_cpu/tests/functional/utils/fusing_test_utils.hpp +++ b/src/plugins/intel_cpu/tests/functional/utils/fusing_test_utils.hpp @@ -183,14 +183,14 @@ const auto fusingSqrt = fusingSpecificParams{std::make_shared(std: const auto fusingPReluPerChannel = fusingSpecificParams{std::make_shared(std::vector{ {[](postNodeConfig& cfg){ ov::Shape newShape = generatePerChannelShape(cfg.target); - auto data = NGraphFunctions::Utils::generateVector(ov::shape_size(newShape)); + auto data = ov::test::utils::generateVector(ov::shape_size(newShape)); return utils::make_activation(cfg.input, cfg.type, utils::LeakyRelu, newShape, data); }, "PRelu(PerChannel)"}}), {"PRelu"}}; const auto fusingPReluPerTensor = fusingSpecificParams{std::make_shared(std::vector{ {[](postNodeConfig& cfg){ ov::Shape shape(1, 1); - auto data = NGraphFunctions::Utils::generateVector(ov::shape_size(shape)); + auto data = ov::test::utils::generateVector(ov::shape_size(shape)); return utils::make_activation(cfg.input, cfg.type, utils::LeakyRelu, shape, data); }, "PRelu(PerTensor)"}}), {"PRelu"}}; @@ -465,7 +465,7 @@ const auto fusingPRelu1D = fusingSpecificParams{std::make_shared(s {[](postNodeConfig& cfg){ auto shape = cfg.input->get_output_partial_shape(0); ov::Shape newShape({static_cast(shape[1].get_length())}); - auto data = NGraphFunctions::Utils::generateVector(ov::shape_size(newShape)); + auto data = ov::test::utils::generateVector(ov::shape_size(newShape)); return utils::make_activation(cfg.input, cfg.type, utils::LeakyRelu, newShape, data); }, "PRelu1D"}}), {"PRelu"}}; @@ -473,7 +473,7 @@ const auto fusingPRelu1DScaleShift = fusingSpecificParams{std::make_sharedget_output_partial_shape(0); ov::Shape newShape({static_cast(shape[1].get_length())}); - auto data = NGraphFunctions::Utils::generateVector(ov::shape_size(newShape)); + auto data = ov::test::utils::generateVector(ov::shape_size(newShape)); return utils::make_activation(cfg.input, cfg.type, utils::LeakyRelu, newShape, data); }, "PRelu1D"}, {[](postNodeConfig& cfg) { diff --git a/src/tests/functional/shared_test_classes/src/base/utils/generate_inputs.cpp b/src/tests/functional/shared_test_classes/src/base/utils/generate_inputs.cpp index 6a2f35e6f566d7..7cbb616336c747 100644 --- a/src/tests/functional/shared_test_classes/src/base/utils/generate_inputs.cpp +++ b/src/tests/functional/shared_test_classes/src/base/utils/generate_inputs.cpp @@ -264,15 +264,15 @@ ov::Tensor generate(const std::shared_ptr& node, int seed = 1; size_t constDataSize = ov::shape_size(targetShape); std::vector inputLowData, inputHighData, outputLowData, outputHighData; - inputLowData = NGraphFunctions::Utils::generateVector(constDataSize, 10, 1, seed); + inputLowData = ov::test::utils::generateVector(constDataSize, 10, 1, seed); if (node->get_levels() != 2) { - inputHighData = NGraphFunctions::Utils::generateVector(constDataSize, 10, 1, seed); - outputLowData = NGraphFunctions::Utils::generateVector(constDataSize, 10, 1, seed); - outputHighData = NGraphFunctions::Utils::generateVector(constDataSize, 10, 1, seed); + inputHighData = ov::test::utils::generateVector(constDataSize, 10, 1, seed); + outputLowData = ov::test::utils::generateVector(constDataSize, 10, 1, seed); + outputHighData = ov::test::utils::generateVector(constDataSize, 10, 1, seed); } else { inputHighData = inputLowData; - outputLowData = NGraphFunctions::Utils::generateVector(constDataSize, 10, 1, seed); - outputHighData = NGraphFunctions::Utils::generateVector(constDataSize, 10, 1, seed); + outputLowData = ov::test::utils::generateVector(constDataSize, 10, 1, seed); + outputHighData = ov::test::utils::generateVector(constDataSize, 10, 1, seed); for (int i = 0; i < constDataSize; i++) { if (outputLowData[i] > outputHighData[i]) { diff --git a/src/tests/test_utils/common_test_utils/include/common_test_utils/data_utils.hpp b/src/tests/test_utils/common_test_utils/include/common_test_utils/data_utils.hpp index 09c66cc15776ca..c8eaf631d8e1af 100644 --- a/src/tests/test_utils/common_test_utils/include/common_test_utils/data_utils.hpp +++ b/src/tests/test_utils/common_test_utils/include/common_test_utils/data_utils.hpp @@ -15,8 +15,9 @@ #include "openvino/core/type/element_type_traits.hpp" #include "openvino/runtime/tensor.hpp" -namespace NGraphFunctions { -namespace Utils { +namespace ov { +namespace test { +namespace utils { template std::vector::value_type> inline generateVector( @@ -105,13 +106,6 @@ std::vector castVector(const std::vector& vec) { return resVec; } -} // namespace Utils -} // namespace NGraphFunctions - -namespace ov { -namespace test { -namespace utils { - inline void fill_data(float* data, size_t size, size_t duty_ratio = 10) { for (size_t i = 0; i < size; i++) { if ((i / duty_ratio) % 2 == 1) { diff --git a/src/tests/test_utils/common_test_utils/include/common_test_utils/node_builders/constant.hpp b/src/tests/test_utils/common_test_utils/include/common_test_utils/node_builders/constant.hpp index 423aaa6915b866..92338d6b3a4514 100644 --- a/src/tests/test_utils/common_test_utils/include/common_test_utils/node_builders/constant.hpp +++ b/src/tests/test_utils/common_test_utils/include/common_test_utils/node_builders/constant.hpp @@ -29,7 +29,7 @@ std::shared_ptr make_constant(const ov::element::Type& type, return std::make_shared( \ type, \ shape, \ - NGraphFunctions::Utils::generateVector(ov::shape_size(shape), \ + generateVector(ov::shape_size(shape), \ ov::element_type_traits::value_type(up_to), \ ov::element_type_traits::value_type(start_from), \ seed)); \ diff --git a/src/tests/test_utils/common_test_utils/src/node_builders/fake_quantize.cpp b/src/tests/test_utils/common_test_utils/src/node_builders/fake_quantize.cpp index 05d82ff015b85e..8c728a58fb3e87 100644 --- a/src/tests/test_utils/common_test_utils/src/node_builders/fake_quantize.cpp +++ b/src/tests/test_utils/common_test_utils/src/node_builders/fake_quantize.cpp @@ -41,15 +41,15 @@ std::shared_ptr make_fake_quantize(const ov::Output& in, const int32_t seed) { size_t constDataSize = ov::shape_size(constShapes); std::vector inputLowData, inputHighData, outputLowData, outputHighData; - inputLowData = NGraphFunctions::Utils::generateVector(constDataSize, 10, 1, seed); + inputLowData = ov::test::utils::generateVector(constDataSize, 10, 1, seed); if (levels != 2) { - inputHighData = NGraphFunctions::Utils::generateVector(constDataSize, 10, 1, seed); - outputLowData = NGraphFunctions::Utils::generateVector(constDataSize, 10, 1, seed); - outputHighData = NGraphFunctions::Utils::generateVector(constDataSize, 10, 1, seed); + inputHighData = ov::test::utils::generateVector(constDataSize, 10, 1, seed); + outputLowData = ov::test::utils::generateVector(constDataSize, 10, 1, seed); + outputHighData = ov::test::utils::generateVector(constDataSize, 10, 1, seed); } else { inputHighData = inputLowData; - outputLowData = NGraphFunctions::Utils::generateVector(constDataSize, 10, 1, seed); - outputHighData = NGraphFunctions::Utils::generateVector(constDataSize, 10, 1, seed); + outputLowData = ov::test::utils::generateVector(constDataSize, 10, 1, seed); + outputHighData = ov::test::utils::generateVector(constDataSize, 10, 1, seed); for (int i = 0; i < constDataSize; i++) { if (outputLowData[i] > outputHighData[i]) {