diff --git a/src/common/transformations/src/transformations/convert_precision.cpp b/src/common/transformations/src/transformations/convert_precision.cpp index e7369c4a230..4f66a064484 100644 --- a/src/common/transformations/src/transformations/convert_precision.cpp +++ b/src/common/transformations/src/transformations/convert_precision.cpp @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include @@ -334,7 +335,9 @@ bool ov::pass::ConvertPrecision::run_on_model(const std::shared_ptr& node, } bool fuse_type_to_topk(const std::shared_ptr& node, const precisions_map& precisions) { - if (auto topk = ov::as_type_ptr(node)) { + if (auto topk = ov::as_type_ptr(node)) { return update_type(1, node, precisions, [&](const element::Type& to) { topk->set_index_element_type(to); }); diff --git a/src/plugins/intel_cpu/src/nodes/topk.cpp b/src/plugins/intel_cpu/src/nodes/topk.cpp index 275c70216df..12fa4717735 100644 --- a/src/plugins/intel_cpu/src/nodes/topk.cpp +++ b/src/plugins/intel_cpu/src/nodes/topk.cpp @@ -270,12 +270,12 @@ private: inline void topk_loop() { if (jcp_.algorithm == TopKAlgorithm::topk_bubble_sort) { if (jcp_.layout == TopKLayoutType::topk_blocked && jcp_.topk_innermost) { - if (jcp_.top_k == 1) { + if (jcp_.top_k == 1 && !jcp_.stable) { topk_bubble_horiz(); } else { topk_bubble_BLK_on_channel_verti(); } - } else if (jcp_.topk_innermost && jcp_.top_k == 1) { + } else if (jcp_.topk_innermost && jcp_.top_k == 1 && !jcp_.stable) { topk_bubble_horiz(); } else { topk_bubble_vector(); @@ -1788,30 +1788,32 @@ private: } }; -bool TopK::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { +bool TopK::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { try { - const auto topKOp = ngraph::as_type_ptr(op); - if (!topKOp) { - errorMessage = "Node is not an instance of the TopK from the operations set v1 or v3"; + if (!one_of(op->get_type_info(), ov::op::v1::TopK::get_type_info_static(), + ov::op::v3::TopK::get_type_info_static(), + ov::op::v11::TopK::get_type_info_static())) { + errorMessage = "Node is not an instance of the TopK from the operation sets v1, v3 or v11"; return false; } + auto topKOp = ov::as_type_ptr(op); if (!isDynamicNgraphNode(op)) { - auto topKConst = std::dynamic_pointer_cast(topKOp->get_input_node_shared_ptr(TOPK_K)); + auto topKConst = std::dynamic_pointer_cast(topKOp->get_input_node_shared_ptr(TOPK_K)); if (!topKConst) { errorMessage = "Second tensor is not constant in static shape mode"; return false; } } - if (topKOp->get_mode() != ngraph::op::TopKMode::MAX && - topKOp->get_mode() != ngraph::op::TopKMode::MIN) { + if (topKOp->get_mode() != ov::op::TopKMode::MAX && + topKOp->get_mode() != ov::op::TopKMode::MIN) { errorMessage = "Unsupported mode."; return false; } - if (!one_of(topKOp->get_sort_type(), ngraph::op::TopKSortType::NONE, - ngraph::op::TopKSortType::SORT_VALUES, - ngraph::op::TopKSortType::SORT_INDICES)) { + if (!one_of(topKOp->get_sort_type(), ov::op::TopKSortType::NONE, + ov::op::TopKSortType::SORT_VALUES, + ov::op::TopKSortType::SORT_INDICES)) { errorMessage = "Unsupported sort type."; return false; } @@ -1821,13 +1823,13 @@ bool TopK::isSupportedOperation(const std::shared_ptr& op, s return true; } -TopK::TopK(const std::shared_ptr& op, const GraphContext::CPtr context) +TopK::TopK(const std::shared_ptr& op, const GraphContext::CPtr context) : Node(op, context, NgraphShapeInferFactory(op, PortMask(TOPK_K))) { std::string errorMessage; if (isSupportedOperation(op, errorMessage)) { errorPrefix = "TopK layer with name '" + getName() + "'"; - auto topKOp = ngraph::as_type_ptr(op); + auto topKOp = ov::as_type_ptr(op); auto in_dims = topKOp->get_input_partial_shape(TOPK_DATA); auto out_dims = topKOp->get_output_partial_shape(TOPK_DATA); @@ -1835,15 +1837,23 @@ TopK::TopK(const std::shared_ptr& op, const GraphContext::CPtr con auto in_dims_size = in_dims.size(); if (!isDynamicNgraphNode(op)) { - auto topKConst = std::dynamic_pointer_cast(topKOp->get_input_node_shared_ptr(TOPK_K)); + auto topKConst = std::dynamic_pointer_cast(topKOp->get_input_node_shared_ptr(TOPK_K)); if (!topKConst) { IE_THROW() << errorPrefix << "gets non-constant second tensor in static shape mode!"; } } axis = topKOp->get_axis(); - mode_max = topKOp->get_mode() == ngraph::op::TopKMode::MAX; - sort_index = topKOp->get_sort_type() == ngraph::op::TopKSortType::SORT_INDICES; + mode_max = topKOp->get_mode() == ov::op::TopKMode::MAX; + sort_index = topKOp->get_sort_type() == ov::op::TopKSortType::SORT_INDICES; + + stable = false; + if (!sort_index) { + const auto topKOpV11 = ngraph::as_type_ptr(op); + if (topKOpV11) { + stable = topKOpV11->get_stable(); + } + } top_k = 0; preset_params_done = false; @@ -1959,7 +1969,10 @@ void TopK::preset_params() { } if (isDynamicNode()) { - if ((layout == TopKLayoutType::topk_ncsp || layout == TopKLayoutType::topk_nspc) && topk_innermost) { + if (stable) { + algorithm = TopKAlgorithm::topk_bubble_sort; + bubble_inplace = false; + } else if ((layout == TopKLayoutType::topk_ncsp || layout == TopKLayoutType::topk_nspc) && topk_innermost) { algorithm = TopKAlgorithm::topk_heap_sort; } else { algorithm = TopKAlgorithm::topk_bubble_sort; @@ -2006,8 +2019,11 @@ void TopK::prepareParams() { // [case 1]: if 2 * (top_k + 1) + 2 <= count_xmm, thus top_k is small enough that the vector registers are sufficient // to keep all necessary data for sorting, no need to load and store frequently, use inplace bubble sort; // (horizotal sorting cases not included) - // [case 2]: only when topk is imposed on innermost dimsension of planar(ncsp/nspc) layout, should heap sort be used; - // [case 3]: by default, use bitonic sort when alg_cost_bitonic < alg_cost_bubble, otherwise use bubble sort. + // [case 2]: if stable sorting is required, bubble sort(topk_bubble_vector/topk_bubble_BLK_on_channel_verti) will be + // applied currently, because among the implemented sorting algorithms, these bubble sort implementations + // are the only stable ones; + // [case 3]: only when topk is imposed on innermost dimsension of planar(ncsp/nspc) layout, should heap sort be used; + // [case 4]: by default, use bitonic sort when alg_cost_bitonic < alg_cost_bubble, otherwise use bubble sort. // alg_cost_bitonic = (N / 4) * logN * (logN + 1) // alg_cost_bubble = K * (K - 1) / 2 + (N - K) * K // where, N = axis_dim, K = topk_k @@ -2018,6 +2034,9 @@ void TopK::prepareParams() { if (top_k <= count_xmm / 2 - 2) { algorithm = TopKAlgorithm::topk_bubble_sort; bubble_inplace = topk_innermost && top_k == 1 ? false : true; + } else if (stable) { + algorithm = TopKAlgorithm::topk_bubble_sort; + bubble_inplace = false; } else if ((layout == TopKLayoutType::topk_ncsp || layout == TopKLayoutType::topk_nspc) && topk_innermost) { algorithm = TopKAlgorithm::topk_heap_sort; } else { @@ -2074,6 +2093,7 @@ void TopK::createPrimitive() { jcp.topk_innermost = topk_innermost; jcp.algorithm = algorithm; jcp.bubble_inplace = bubble_inplace; + jcp.stable = stable; jcp.sort_stride = static_cast(I); jcp.work_amount = static_cast(I); jcp.bitonic_idx_cnt = 0; @@ -2207,7 +2227,9 @@ inline void TopK::prepare_original_idx() { bool shape_agnostic_alg = algorithm == TopKAlgorithm::topk_heap_sort || (algorithm == TopKAlgorithm::topk_bubble_sort && !bubble_inplace); if (shape_agnostic_alg) { - if (topk_innermost) { + bool use_idx_seq = stable ? topk_innermost && (layout == TopKLayoutType::topk_blocked || (top_k == 1 && !stable)) + : topk_innermost; + if (use_idx_seq) { if (vec_idx_seq.empty()) { vec_idx_seq.resize(axis_dim); std::iota(vec_idx_seq.begin(), vec_idx_seq.end(), 0); diff --git a/src/plugins/intel_cpu/src/nodes/topk.h b/src/plugins/intel_cpu/src/nodes/topk.h index cda0720a35e..29060026e70 100644 --- a/src/plugins/intel_cpu/src/nodes/topk.h +++ b/src/plugins/intel_cpu/src/nodes/topk.h @@ -32,6 +32,7 @@ struct jit_topk_config_params { bool sort_index; // sort by value or index. true: index; false: value bool topk_innermost; // if topk sorting is applied on innermost dimension or other dimension bool bubble_inplace; // all the elements in sorting is right in the register, no need to load and store for each comparison + bool stable; // if require stable sorting TopKLayoutType layout; // memory layout TopKAlgorithm algorithm; // topk sorting algorithm InferenceEngine::Precision precision; // precision @@ -115,6 +116,7 @@ private: bool topk_innermost; bool jit_mode; bool sort_index; + bool stable; bool mode_max; int axis; static const size_t TOPK_DATA = 0; diff --git a/src/plugins/intel_cpu/src/transformation_pipeline.cpp b/src/plugins/intel_cpu/src/transformation_pipeline.cpp index 2bedc4d32df..de6fd09844d 100644 --- a/src/plugins/intel_cpu/src/transformation_pipeline.cpp +++ b/src/plugins/intel_cpu/src/transformation_pipeline.cpp @@ -71,6 +71,8 @@ #include "transformations/op_conversions/softsign_decomposition.hpp" #include "transformations/op_conversions/softmax_decomposition.hpp" #include "transformations/op_conversions/unique_decomposition.hpp" +#include "transformations/op_conversions/convert_topk3.hpp" +#include "transformations/op_conversions/convert_topk11_downgrade.hpp" #include "transformations/opset_conversions/convert_opset2_to_opset1.hpp" #include "transformations/opset_conversions/convert_opset3_to_opset2.hpp" #include "transformations/smart_reshape/matmul_sr.hpp" @@ -398,6 +400,8 @@ void Transformations::PreLpt(const std::vector& defaultPrecis pass_config->disable(); pass_config->disable(); pass_config->disable(); + pass_config->disable(); + pass_config->disable(); pass_config->enable(); pass_config->enable(); diff --git a/src/plugins/intel_cpu/tests/functional/single_layer_tests/topk.cpp b/src/plugins/intel_cpu/tests/functional/single_layer_tests/topk.cpp index fadf1c5f768..5026bd76bec 100644 --- a/src/plugins/intel_cpu/tests/functional/single_layer_tests/topk.cpp +++ b/src/plugins/intel_cpu/tests/functional/single_layer_tests/topk.cpp @@ -10,18 +10,20 @@ using namespace InferenceEngine; using namespace CPUTestUtils; using namespace ov::test; +using SortMode = ov::op::TopKMode; +using SortType = ov::op::TopKSortType; namespace CPULayerTestsDefinitions { typedef std::tuple< - int64_t, // keepK - int64_t, // axis - ngraph::opset4::TopK::Mode, // mode - ngraph::opset4::TopK::SortType, // sort - ElementType, // Net precision - ElementType, // Input precision - ElementType, // Output precision - InputShape // inputShape + int64_t, // keepK + int64_t, // axis + SortMode, // mode + std::tuple, // sort and stable + ElementType, // Net precision + ElementType, // Input precision + ElementType, // Output precision + InputShape // inputShape > basicTopKParams; typedef std::tuple< @@ -39,11 +41,13 @@ public: std::tie(basicParamsSet, cpuParams, additionalConfig) = obj.param; int64_t keepK, axis; - ngraph::opset4::TopK::Mode mode; - ngraph::opset4::TopK::SortType sort; + SortMode mode; + std::tuple sortTypeStable; ElementType netPrecision, inPrc, outPrc; InputShape inputShape; - std::tie(keepK, axis, mode, sort, netPrecision, inPrc, outPrc, inputShape) = basicParamsSet; + std::tie(keepK, axis, mode, sortTypeStable, netPrecision, inPrc, outPrc, inputShape) = basicParamsSet; + SortType sort = std::get<0>(sortTypeStable); + bool stable = std::get<1>(sortTypeStable); std::ostringstream result; bool staticShape = inputShape.first.rank() == 0; @@ -52,6 +56,7 @@ public: result << "axis=" << axis << "_"; result << "mode=" << mode << "_"; result << "sort=" << sort << "_"; + result << "stable=" << (stable ? "True" : "False") << "_"; result << "netPRC=" << netPrecision << "_"; result << "inPRC=" << inPrc << "_"; result << "outPRC=" << outPrc << "_"; @@ -85,11 +90,13 @@ protected: std::tie(inFmts, outFmts, priority, selectedType) = cpuParams; int64_t keepK; - ngraph::opset4::TopK::Mode mode; - ngraph::opset4::TopK::SortType sort; + SortMode mode; + std::tuple sortTypeStable; ElementType inPrc, outPrc; InputShape inputShape; - std::tie(keepK, axis, mode, sort, netPrecision, inPrc, outPrc, inputShape) = basicParamsSet; + std::tie(keepK, axis, mode, sortTypeStable, netPrecision, inPrc, outPrc, inputShape) = basicParamsSet; + sort = std::get<0>(sortTypeStable); + stable = std::get<1>(sortTypeStable); if (additionalConfig[PluginConfigParams::KEY_ENFORCE_BF16] == PluginConfigParams::YES) inPrc = outPrc = netPrecision = ElementType::bf16; @@ -112,33 +119,34 @@ protected: auto params = ngraph::builder::makeDynamicParams(netPrecision, {inputDynamicShapes[0]}); // static shape need specific const k to test different sorting algorithms, dynamic shape tests random param k - std::shared_ptr topk; + std::shared_ptr topk; if (staticShape) { - auto k = std::make_shared(ngraph::element::Type_t::i64, ngraph::Shape{}, &keepK); - topk = std::dynamic_pointer_cast( - std::make_shared(params[0], k, axis, mode, sort)); + auto k = std::make_shared(ElementType::i64, ov::Shape{}, &keepK); + topk = std::dynamic_pointer_cast( + std::make_shared(params[0], k, axis, mode, sort, ElementType::i32, stable)); } else { - auto k = std::make_shared(ngraph::element::Type_t::i64, inputDynamicShapes[1]); + auto k = std::make_shared(ElementType::i64, inputDynamicShapes[1]); params.push_back(k); - topk = std::dynamic_pointer_cast( - std::make_shared(params[0], k, axis, mode, sort)); + topk = std::dynamic_pointer_cast( + std::make_shared(params[0], k, axis, mode, sort, ElementType::i32, stable)); } topk->get_rt_info() = getCPUInfo(); ngraph::ResultVector results; for (size_t i = 0; i < topk->get_output_size(); i++) { - results.push_back(std::make_shared(topk->output(i))); + results.push_back(std::make_shared(topk->output(i))); } function = std::make_shared(results, params, "TopK"); } - void generate_inputs(const std::vector& targetInputStaticShapes) override { + void generate_inputs(const std::vector& targetInputStaticShapes) override { inputs.clear(); const auto& funcInputs = function->inputs(); - // Spec TopK_3.md allows to use unstable sorting, thus generate unreapeated input data to avoid a. and b. + // For unstable sorting, generate unrepeated input data to avoid a. and b. While for stable sorting, + // repeating values are explicitly set. // a. Skip comparing of index results, because an element in actual index tensor can be different with // its counterpart in expected index tensor // b. If SortType is SORT_INDICES or NONE, the test program still needs to apply std::sort for all pairs @@ -153,7 +161,11 @@ protected: // For int32, deliberately set big numbers which are not accurately representable in fp32 int start = netPrecision == ElementType::i32 ? pow(2, 30) + 1 : - static_cast(size / 2); - std::iota(data.begin(), data.end(), start); + size_t set_size = sort == SortType::SORT_VALUES && stable ? size / 2 : size; + std::iota(data.begin(), data.begin() + set_size, start); + if (sort == SortType::SORT_VALUES && stable) { + std::copy(data.begin(), data.begin() + set_size, data.begin() + set_size); + } std::mt19937 gen(0); std::shuffle(data.begin(), data.end(), gen); @@ -178,7 +190,7 @@ protected: if (O * A * I != size) FAIL() << "Incorrect blob shape " << shape; - auto *rawBlobDataPtr = static_cast(tensor.data()); + auto *rawBlobDataPtr = static_cast(tensor.data()); for (size_t o = 0; o < O; o++) { for (size_t i = 0; i < I; i++) { std::vector data(A); @@ -188,7 +200,7 @@ protected: std::mt19937 gen(seed); std::shuffle(data.begin(), data.end(), gen); for (size_t a = 0; a < A; a++) { - rawBlobDataPtr[o * A * I + a * I + i] = static_cast(data[a]); + rawBlobDataPtr[o * A * I + a * I + i] = static_cast(data[a]); } } } @@ -198,20 +210,28 @@ protected: inputs.insert({funcInputs[0].get_node_shared_ptr(), tensor}); if (!staticShape) { - const auto& kPrecision = funcInputs[1].get_element_type(); - const auto& kShape = targetInputStaticShapes[1]; - - const size_t startFrom = 1; - const size_t range = targetInputStaticShapes[0][axis]; - const size_t seed = inferRequestNum++; - const auto kTensor = ov::test::utils::create_and_fill_tensor(kPrecision, kShape, range, startFrom, 1, seed); - - inputs.insert({funcInputs[1].get_node_shared_ptr(), kTensor}); + generate_dynamic_k(funcInputs, targetInputStaticShapes); } } +private: + void generate_dynamic_k(const std::vector>& funcInputs, + const std::vector& targetInputStaticShapes) { + const auto& kPrecision = funcInputs[1].get_element_type(); + const auto& kShape = targetInputStaticShapes[1]; + + const size_t startFrom = 1; + const size_t range = targetInputStaticShapes[0][axis]; + const size_t seed = inferRequestNum++; + const auto kTensor = ov::test::utils::create_and_fill_tensor(kPrecision, kShape, range, startFrom, 1, seed); + + inputs.insert({funcInputs[1].get_node_shared_ptr(), kTensor}); + } + private: int64_t axis; + SortType sort; + bool stable; size_t inferRequestNum = 0; ElementType netPrecision; bool staticShape; @@ -236,14 +256,15 @@ std::vector> additionalConfig = { const std::vector axes = {0, 1, 2, 3}; const std::vector k = {1, 5, 7, 18, 21}; -const std::vector modes = { - ngraph::opset4::TopK::Mode::MIN, - ngraph::opset4::TopK::Mode::MAX +const std::vector modes = { + SortMode::MIN, + SortMode::MAX }; -const std::vector sortTypes = { - ngraph::opset4::TopK::SortType::SORT_VALUES, - ngraph::opset4::TopK::SortType::SORT_INDICES, +const std::vector> sortTypeStable = { + std::tuple{SortType::SORT_VALUES, false}, + std::tuple{SortType::SORT_VALUES, true}, + std::tuple{SortType::SORT_INDICES, false} }; std::vector inputShapes = { @@ -266,7 +287,7 @@ INSTANTIATE_TEST_CASE_P(smoke_TopK, TopKLayerCPUTest, ::testing::ValuesIn(k), ::testing::ValuesIn(axes), ::testing::ValuesIn(modes), - ::testing::ValuesIn(sortTypes), + ::testing::ValuesIn(sortTypeStable), ::testing::ValuesIn(netPrecisions), ::testing::Values(ElementType::undefined), ::testing::Values(ElementType::undefined), @@ -281,7 +302,7 @@ INSTANTIATE_TEST_CASE_P(smoke_TopK_dynamic, TopKLayerCPUTest, ::testing::Values(1), ::testing::ValuesIn(axes), ::testing::ValuesIn(modes), - ::testing::ValuesIn(sortTypes), + ::testing::ValuesIn(sortTypeStable), ::testing::ValuesIn(netPrecisions), ::testing::Values(ElementType::undefined), ::testing::Values(ElementType::undefined), @@ -306,7 +327,7 @@ INSTANTIATE_TEST_CASE_P(smoke_TopK_int32, TopKLayerCPUTest, ::testing::ValuesIn(k_int32), ::testing::ValuesIn(axes), ::testing::ValuesIn(modes), - ::testing::ValuesIn(sortTypes), + ::testing::ValuesIn(sortTypeStable), ::testing::Values(ElementType::i32), ::testing::Values(ElementType::undefined), ::testing::Values(ElementType::undefined), @@ -321,7 +342,7 @@ INSTANTIATE_TEST_CASE_P(smoke_TopK_int32_dynamic, TopKLayerCPUTest, ::testing::Values(1), ::testing::ValuesIn(axes), ::testing::ValuesIn(modes), - ::testing::ValuesIn(sortTypes), + ::testing::ValuesIn(sortTypeStable), ::testing::Values(ElementType::i32), ::testing::Values(ElementType::undefined), ::testing::Values(ElementType::undefined), @@ -344,7 +365,7 @@ INSTANTIATE_TEST_CASE_P(smoke_TopK_bubble_BLK_on_channel_horiz, TopKLayerCPUTest ::testing::Values(1), ::testing::Values(1), ::testing::ValuesIn(modes), - ::testing::ValuesIn(sortTypes), + ::testing::ValuesIn(sortTypeStable), ::testing::ValuesIn(netPrecisions), ::testing::Values(ElementType::undefined), ::testing::Values(ElementType::undefined), @@ -359,7 +380,7 @@ INSTANTIATE_TEST_CASE_P(smoke_TopK_bubble_BLK_on_channel_horiz_dynamic, TopKLaye ::testing::Values(1), ::testing::Values(1), ::testing::ValuesIn(modes), - ::testing::ValuesIn(sortTypes), + ::testing::ValuesIn(sortTypeStable), ::testing::ValuesIn(netPrecisions), ::testing::Values(ElementType::undefined), ::testing::Values(ElementType::undefined), @@ -381,8 +402,8 @@ INSTANTIATE_TEST_CASE_P(smoke_Top1, TopKLayerCPUTest, ::testing::Combine( ::testing::Values(1), ::testing::Values(3), - ::testing::Values(ngraph::opset4::TopK::Mode::MAX), - ::testing::Values(ngraph::opset4::TopK::SortType::SORT_INDICES), + ::testing::Values(SortMode::MAX), + ::testing::Values(std::tuple(SortType::SORT_INDICES, false)), ::testing::ValuesIn(netPrecisions), ::testing::Values(ElementType::undefined), ::testing::Values(ElementType::undefined), @@ -396,8 +417,8 @@ INSTANTIATE_TEST_CASE_P(smoke_Top1_dynamic, TopKLayerCPUTest, ::testing::Combine( ::testing::Values(1), ::testing::Values(3), - ::testing::Values(ngraph::opset4::TopK::Mode::MAX), - ::testing::Values(ngraph::opset4::TopK::SortType::SORT_INDICES), + ::testing::Values(SortMode::MAX), + ::testing::Values(std::tuple(SortType::SORT_INDICES, false)), ::testing::ValuesIn(netPrecisions), ::testing::Values(ElementType::undefined), ::testing::Values(ElementType::undefined), diff --git a/src/tests/functional/shared_test_classes/src/base/utils/compare_results.cpp b/src/tests/functional/shared_test_classes/src/base/utils/compare_results.cpp index e285a1b86d3..76a6be2b779 100644 --- a/src/tests/functional/shared_test_classes/src/base/utils/compare_results.cpp +++ b/src/tests/functional/shared_test_classes/src/base/utils/compare_results.cpp @@ -80,6 +80,7 @@ CompareMap getCompareMap() { #include "openvino/opsets/opset8_tbl.hpp" #include "openvino/opsets/opset9_tbl.hpp" #include "openvino/opsets/opset10_tbl.hpp" +#include "openvino/opsets/opset11_tbl.hpp" #include "ov_ops/opset_private_tbl.hpp" #undef _OPENVINO_OP_REG 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 4a4d20c259b..db7818d5c21 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 @@ -835,6 +835,7 @@ InputsMap getInputMap() { #include "openvino/opsets/opset8_tbl.hpp" #include "openvino/opsets/opset9_tbl.hpp" #include "openvino/opsets/opset10_tbl.hpp" +#include "openvino/opsets/opset11_tbl.hpp" #include "ov_ops/opset_private_tbl.hpp" #undef _OPENVINO_OP_REG diff --git a/src/tests/ngraph_helpers/ngraph_functions/include/ngraph_functions/builders.hpp b/src/tests/ngraph_helpers/ngraph_functions/include/ngraph_functions/builders.hpp index 9a72ae31b32..73962af5e12 100644 --- a/src/tests/ngraph_helpers/ngraph_functions/include/ngraph_functions/builders.hpp +++ b/src/tests/ngraph_helpers/ngraph_functions/include/ngraph_functions/builders.hpp @@ -16,6 +16,8 @@ #include #include #include +#include +#include #include "ngraph_functions/utils/data_utils.hpp" #include "openvino/core/partial_shape.hpp"