diff --git a/src/inference/dev_api/openvino/runtime/system_conf.hpp b/src/inference/dev_api/openvino/runtime/system_conf.hpp index bebc2014ab8028..fbb0fafb376fbf 100644 --- a/src/inference/dev_api/openvino/runtime/system_conf.hpp +++ b/src/inference/dev_api/openvino/runtime/system_conf.hpp @@ -219,6 +219,13 @@ OPENVINO_RUNTIME_API std::vector> get_proc_type_table(); */ OPENVINO_RUNTIME_API int get_current_socket_id(); +/** + * @brief Returns the numa node ID in cpu mapping table of the currently running thread. + * @ingroup ov_dev_api_system_conf + * @return numa node ID in cpu mapping + */ +OPENVINO_RUNTIME_API int get_current_numa_node_id(); + /** * @brief Returns a table of original number of processor types without filtering other plugins occupying CPU * resources. The difference from get_proc_type_table: This is used to get the configuration of current machine. For diff --git a/src/inference/src/os/cpu_map_info.hpp b/src/inference/src/os/cpu_map_info.hpp index 2cc6cef768d68d..1182ea4c974e01 100644 --- a/src/inference/src/os/cpu_map_info.hpp +++ b/src/inference/src/os/cpu_map_info.hpp @@ -54,38 +54,6 @@ class CPU { std::mutex _cpu_mutex; int _socket_idx = 0; -private: - /** - * @brief Sort proc_type_table by CPU ID on which application is running. The numa node containing this CPU ID - * will move to first row. - * @param[in] _processor_id CPU ID on which application is running. - * @param[in] _proc_type_table summary table of number of processors per type - * @param[in] _cpu_mapping_table CPU mapping table for each processor - * @return - */ - void sort_table_by_cpu_id(const int _processor_id, - std::vector>& _proc_type_table, - const std::vector>& _cpu_mapping_table) { - int current_numa_node = 0; - int current_socket = 0; - - for (auto& row : _cpu_mapping_table) { - if (_processor_id == row[CPU_MAP_PROCESSOR_ID]) { - current_numa_node = row[CPU_MAP_NUMA_NODE_ID]; - current_socket = row[CPU_MAP_SOCKET_ID]; - break; - } - } - for (size_t i = 1; i < _proc_type_table.size(); i++) { - if ((current_numa_node == _proc_type_table[i][PROC_NUMA_NODE_ID]) && - (current_socket == _proc_type_table[i][PROC_SOCKET_ID])) { - std::rotate(_proc_type_table.begin() + 1, _proc_type_table.begin() + i, _proc_type_table.end()); - break; - } - } - }; - - friend class LinuxSortProcTableTests; }; CPU& cpu_info(); diff --git a/src/inference/src/os/lin/lin_system_conf.cpp b/src/inference/src/os/lin/lin_system_conf.cpp index 29c8bfddbd1ca4..66ebcb299f67c5 100644 --- a/src/inference/src/os/lin/lin_system_conf.cpp +++ b/src/inference/src/os/lin/lin_system_conf.cpp @@ -316,11 +316,6 @@ CPU::CPU() { OPENVINO_THROW("CPU affinity check failed. No CPU is eligible to run inference."); }; - if (_proc_type_table.size() > 1) { - int cur_processor_id = sched_getcpu(); - sort_table_by_cpu_id(cur_processor_id, _proc_type_table, _cpu_mapping_table); - } - _org_proc_type_table = _proc_type_table; cpu_debug(); diff --git a/src/inference/src/os/win/win_system_conf.cpp b/src/inference/src/os/win/win_system_conf.cpp index 97831207df73d5..504ab0e8e9d925 100644 --- a/src/inference/src/os/win/win_system_conf.cpp +++ b/src/inference/src/os/win/win_system_conf.cpp @@ -52,11 +52,6 @@ CPU::CPU() { } } - if (_proc_type_table.size() > 1) { - int cur_processor_id = GetCurrentProcessorNumber(); - sort_table_by_cpu_id(cur_processor_id, _proc_type_table, _cpu_mapping_table); - } - cpu_debug(); } diff --git a/src/inference/src/system_conf.cpp b/src/inference/src/system_conf.cpp index 3227b1a3034903..09db44dc70cc1a 100644 --- a/src/inference/src/system_conf.cpp +++ b/src/inference/src/system_conf.cpp @@ -261,6 +261,10 @@ int get_current_socket_id() { return 0; } +int get_current_numa_node_id() { + return 0; +} + std::vector> get_proc_type_table() { return {{-1}}; } @@ -322,6 +326,10 @@ int get_current_socket_id() { return 0; } +int get_current_numa_node_id() { + return 0; +} + std::vector> get_proc_type_table() { CPU& cpu = cpu_info(); std::lock_guard lock{cpu._cpu_mutex}; @@ -411,8 +419,43 @@ int get_current_socket_id() { return 0; } + +int get_current_numa_node_id() { + CPU& cpu = cpu_info(); + int cur_processor_id = sched_getcpu(); + + for (auto& row : cpu._cpu_mapping_table) { + if (cur_processor_id == row[CPU_MAP_PROCESSOR_ID]) { + return row[CPU_MAP_NUMA_NODE_ID]; + } + } + + return 0; +} # else int get_current_socket_id() { + CPU& cpu = cpu_info(); + int cur_processor_id = GetCurrentProcessorNumber(); + + for (auto& row : cpu._cpu_mapping_table) { + if (cur_processor_id == row[CPU_MAP_PROCESSOR_ID]) { + return row[CPU_MAP_SOCKET_ID]; + } + } + + return 0; +} + +int get_current_numa_node_id() { + CPU& cpu = cpu_info(); + int cur_processor_id = GetCurrentProcessorNumber(); + + for (auto& row : cpu._cpu_mapping_table) { + if (cur_processor_id == row[CPU_MAP_PROCESSOR_ID]) { + return row[CPU_MAP_NUMA_NODE_ID]; + } + } + return 0; } # endif diff --git a/src/inference/tests/unit/cpu_map_parser/update_proc_table.cpp b/src/inference/tests/unit/cpu_map_parser/update_proc_table.cpp deleted file mode 100644 index fe255b85f47a33..00000000000000 --- a/src/inference/tests/unit/cpu_map_parser/update_proc_table.cpp +++ /dev/null @@ -1,173 +0,0 @@ -// Copyright (C) 2018-2024 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include - -#include "common_test_utils/test_common.hpp" -#include "openvino/runtime/system_conf.hpp" -#include "os/cpu_map_info.hpp" - -using namespace testing; - -namespace ov { - -#ifdef __linux__ - -struct LinuxSortProcTableTestCase { - int current_processor_id; - std::vector> _proc_type_table_input; - std::vector> _cpu_mapping_table; - std::vector> _proc_type_table_output; -}; - -class LinuxSortProcTableTests : public ov::test::TestsCommon, - public testing::WithParamInterface> { -public: - void SetUp() override { - const auto& test_data = std::get<0>(GetParam()); - - CPU& cpu = cpu_info(); - std::vector> test_proc_type_table = test_data._proc_type_table_input; - - cpu.sort_table_by_cpu_id(test_data.current_processor_id, test_proc_type_table, test_data._cpu_mapping_table); - - ASSERT_EQ(test_proc_type_table, test_data._proc_type_table_output); - } -}; - -LinuxSortProcTableTestCase proc_table_2sockets_24cores_hyperthreading_1 = { - 2, - {{48, 24, 0, 24, -1, -1}, {12, 6, 0, 6, 0, 0}, {12, 6, 0, 6, 1, 0}, {12, 6, 0, 6, 2, 1}, {12, 6, 0, 6, 3, 1}}, - { - {0, 0, 0, 0, HYPER_THREADING_PROC, 0, -1}, {1, 2, 1, 12, HYPER_THREADING_PROC, 12, -1}, - {2, 0, 0, 1, HYPER_THREADING_PROC, 1, -1}, {3, 2, 1, 13, HYPER_THREADING_PROC, 13, -1}, - {4, 0, 0, 2, HYPER_THREADING_PROC, 2, -1}, {5, 2, 1, 14, HYPER_THREADING_PROC, 14, -1}, - {6, 0, 0, 3, HYPER_THREADING_PROC, 3, -1}, {7, 2, 1, 15, HYPER_THREADING_PROC, 15, -1}, - {8, 0, 0, 4, HYPER_THREADING_PROC, 4, -1}, {9, 2, 1, 16, HYPER_THREADING_PROC, 16, -1}, - {10, 0, 0, 5, HYPER_THREADING_PROC, 5, -1}, {11, 2, 1, 17, HYPER_THREADING_PROC, 17, -1}, - {12, 1, 0, 6, HYPER_THREADING_PROC, 6, -1}, {13, 3, 1, 18, HYPER_THREADING_PROC, 18, -1}, - {14, 1, 0, 7, HYPER_THREADING_PROC, 7, -1}, {15, 3, 1, 19, HYPER_THREADING_PROC, 19, -1}, - {16, 1, 0, 8, HYPER_THREADING_PROC, 8, -1}, {17, 3, 1, 20, HYPER_THREADING_PROC, 20, -1}, - {18, 1, 0, 9, HYPER_THREADING_PROC, 9, -1}, {19, 3, 1, 21, HYPER_THREADING_PROC, 21, -1}, - {20, 1, 0, 10, HYPER_THREADING_PROC, 10, -1}, {21, 3, 1, 22, HYPER_THREADING_PROC, 22, -1}, - {22, 1, 0, 11, HYPER_THREADING_PROC, 11, -1}, {23, 3, 1, 23, HYPER_THREADING_PROC, 23, -1}, - {24, 0, 0, 0, MAIN_CORE_PROC, 0, -1}, {25, 2, 1, 12, MAIN_CORE_PROC, 12, -1}, - {26, 0, 0, 1, MAIN_CORE_PROC, 1, -1}, {27, 2, 1, 13, MAIN_CORE_PROC, 13, -1}, - {28, 0, 0, 2, MAIN_CORE_PROC, 2, -1}, {29, 2, 1, 14, MAIN_CORE_PROC, 14, -1}, - {30, 0, 0, 3, MAIN_CORE_PROC, 3, -1}, {31, 2, 1, 15, MAIN_CORE_PROC, 15, -1}, - {32, 0, 0, 4, MAIN_CORE_PROC, 4, -1}, {33, 2, 1, 16, MAIN_CORE_PROC, 16, -1}, - {34, 0, 0, 5, MAIN_CORE_PROC, 5, -1}, {35, 2, 1, 17, MAIN_CORE_PROC, 17, -1}, - {36, 1, 0, 6, MAIN_CORE_PROC, 6, -1}, {37, 3, 1, 18, MAIN_CORE_PROC, 18, -1}, - {38, 1, 0, 7, MAIN_CORE_PROC, 7, -1}, {39, 3, 1, 19, MAIN_CORE_PROC, 19, -1}, - {40, 1, 0, 8, MAIN_CORE_PROC, 8, -1}, {41, 3, 1, 20, MAIN_CORE_PROC, 20, -1}, - {42, 1, 0, 9, MAIN_CORE_PROC, 9, -1}, {43, 3, 1, 21, MAIN_CORE_PROC, 21, -1}, - {44, 1, 0, 10, MAIN_CORE_PROC, 10, -1}, {45, 3, 1, 22, MAIN_CORE_PROC, 22, -1}, - {46, 1, 0, 11, MAIN_CORE_PROC, 11, -1}, {47, 3, 1, 23, MAIN_CORE_PROC, 23, -1}, - }, - {{48, 24, 0, 24, -1, -1}, {12, 6, 0, 6, 0, 0}, {12, 6, 0, 6, 1, 0}, {12, 6, 0, 6, 2, 1}, {12, 6, 0, 6, 3, 1}}, -}; -LinuxSortProcTableTestCase proc_table_2sockets_24cores_hyperthreading_2 = { - 16, - {{48, 24, 0, 24, -1, -1}, {12, 6, 0, 6, 0, 0}, {12, 6, 0, 6, 1, 0}, {12, 6, 0, 6, 2, 1}, {12, 6, 0, 6, 3, 1}}, - { - {0, 0, 0, 0, HYPER_THREADING_PROC, 0, -1}, {1, 2, 1, 12, HYPER_THREADING_PROC, 12, -1}, - {2, 0, 0, 1, HYPER_THREADING_PROC, 1, -1}, {3, 2, 1, 13, HYPER_THREADING_PROC, 13, -1}, - {4, 0, 0, 2, HYPER_THREADING_PROC, 2, -1}, {5, 2, 1, 14, HYPER_THREADING_PROC, 14, -1}, - {6, 0, 0, 3, HYPER_THREADING_PROC, 3, -1}, {7, 2, 1, 15, HYPER_THREADING_PROC, 15, -1}, - {8, 0, 0, 4, HYPER_THREADING_PROC, 4, -1}, {9, 2, 1, 16, HYPER_THREADING_PROC, 16, -1}, - {10, 0, 0, 5, HYPER_THREADING_PROC, 5, -1}, {11, 2, 1, 17, HYPER_THREADING_PROC, 17, -1}, - {12, 1, 0, 6, HYPER_THREADING_PROC, 6, -1}, {13, 3, 1, 18, HYPER_THREADING_PROC, 18, -1}, - {14, 1, 0, 7, HYPER_THREADING_PROC, 7, -1}, {15, 3, 1, 19, HYPER_THREADING_PROC, 19, -1}, - {16, 1, 0, 8, HYPER_THREADING_PROC, 8, -1}, {17, 3, 1, 20, HYPER_THREADING_PROC, 20, -1}, - {18, 1, 0, 9, HYPER_THREADING_PROC, 9, -1}, {19, 3, 1, 21, HYPER_THREADING_PROC, 21, -1}, - {20, 1, 0, 10, HYPER_THREADING_PROC, 10, -1}, {21, 3, 1, 22, HYPER_THREADING_PROC, 22, -1}, - {22, 1, 0, 11, HYPER_THREADING_PROC, 11, -1}, {23, 3, 1, 23, HYPER_THREADING_PROC, 23, -1}, - {24, 0, 0, 0, MAIN_CORE_PROC, 0, -1}, {25, 2, 1, 12, MAIN_CORE_PROC, 12, -1}, - {26, 0, 0, 1, MAIN_CORE_PROC, 1, -1}, {27, 2, 1, 13, MAIN_CORE_PROC, 13, -1}, - {28, 0, 0, 2, MAIN_CORE_PROC, 2, -1}, {29, 2, 1, 14, MAIN_CORE_PROC, 14, -1}, - {30, 0, 0, 3, MAIN_CORE_PROC, 3, -1}, {31, 2, 1, 15, MAIN_CORE_PROC, 15, -1}, - {32, 0, 0, 4, MAIN_CORE_PROC, 4, -1}, {33, 2, 1, 16, MAIN_CORE_PROC, 16, -1}, - {34, 0, 0, 5, MAIN_CORE_PROC, 5, -1}, {35, 2, 1, 17, MAIN_CORE_PROC, 17, -1}, - {36, 1, 0, 6, MAIN_CORE_PROC, 6, -1}, {37, 3, 1, 18, MAIN_CORE_PROC, 18, -1}, - {38, 1, 0, 7, MAIN_CORE_PROC, 7, -1}, {39, 3, 1, 19, MAIN_CORE_PROC, 19, -1}, - {40, 1, 0, 8, MAIN_CORE_PROC, 8, -1}, {41, 3, 1, 20, MAIN_CORE_PROC, 20, -1}, - {42, 1, 0, 9, MAIN_CORE_PROC, 9, -1}, {43, 3, 1, 21, MAIN_CORE_PROC, 21, -1}, - {44, 1, 0, 10, MAIN_CORE_PROC, 10, -1}, {45, 3, 1, 22, MAIN_CORE_PROC, 22, -1}, - {46, 1, 0, 11, MAIN_CORE_PROC, 11, -1}, {47, 3, 1, 23, MAIN_CORE_PROC, 23, -1}, - }, - {{48, 24, 0, 24, -1, -1}, {12, 6, 0, 6, 1, 0}, {12, 6, 0, 6, 2, 1}, {12, 6, 0, 6, 3, 1}, {12, 6, 0, 6, 0, 0}}, -}; -LinuxSortProcTableTestCase proc_table_2sockets_24cores_hyperthreading_3 = { - 7, - {{48, 24, 0, 24, -1, -1}, {12, 6, 0, 6, 0, 0}, {12, 6, 0, 6, 1, 0}, {12, 6, 0, 6, 2, 1}, {12, 6, 0, 6, 3, 1}}, - { - {0, 0, 0, 0, HYPER_THREADING_PROC, 0, -1}, {1, 2, 1, 12, HYPER_THREADING_PROC, 12, -1}, - {2, 0, 0, 1, HYPER_THREADING_PROC, 1, -1}, {3, 2, 1, 13, HYPER_THREADING_PROC, 13, -1}, - {4, 0, 0, 2, HYPER_THREADING_PROC, 2, -1}, {5, 2, 1, 14, HYPER_THREADING_PROC, 14, -1}, - {6, 0, 0, 3, HYPER_THREADING_PROC, 3, -1}, {7, 2, 1, 15, HYPER_THREADING_PROC, 15, -1}, - {8, 0, 0, 4, HYPER_THREADING_PROC, 4, -1}, {9, 2, 1, 16, HYPER_THREADING_PROC, 16, -1}, - {10, 0, 0, 5, HYPER_THREADING_PROC, 5, -1}, {11, 2, 1, 17, HYPER_THREADING_PROC, 17, -1}, - {12, 1, 0, 6, HYPER_THREADING_PROC, 6, -1}, {13, 3, 1, 18, HYPER_THREADING_PROC, 18, -1}, - {14, 1, 0, 7, HYPER_THREADING_PROC, 7, -1}, {15, 3, 1, 19, HYPER_THREADING_PROC, 19, -1}, - {16, 1, 0, 8, HYPER_THREADING_PROC, 8, -1}, {17, 3, 1, 20, HYPER_THREADING_PROC, 20, -1}, - {18, 1, 0, 9, HYPER_THREADING_PROC, 9, -1}, {19, 3, 1, 21, HYPER_THREADING_PROC, 21, -1}, - {20, 1, 0, 10, HYPER_THREADING_PROC, 10, -1}, {21, 3, 1, 22, HYPER_THREADING_PROC, 22, -1}, - {22, 1, 0, 11, HYPER_THREADING_PROC, 11, -1}, {23, 3, 1, 23, HYPER_THREADING_PROC, 23, -1}, - {24, 0, 0, 0, MAIN_CORE_PROC, 0, -1}, {25, 2, 1, 12, MAIN_CORE_PROC, 12, -1}, - {26, 0, 0, 1, MAIN_CORE_PROC, 1, -1}, {27, 2, 1, 13, MAIN_CORE_PROC, 13, -1}, - {28, 0, 0, 2, MAIN_CORE_PROC, 2, -1}, {29, 2, 1, 14, MAIN_CORE_PROC, 14, -1}, - {30, 0, 0, 3, MAIN_CORE_PROC, 3, -1}, {31, 2, 1, 15, MAIN_CORE_PROC, 15, -1}, - {32, 0, 0, 4, MAIN_CORE_PROC, 4, -1}, {33, 2, 1, 16, MAIN_CORE_PROC, 16, -1}, - {34, 0, 0, 5, MAIN_CORE_PROC, 5, -1}, {35, 2, 1, 17, MAIN_CORE_PROC, 17, -1}, - {36, 1, 0, 6, MAIN_CORE_PROC, 6, -1}, {37, 3, 1, 18, MAIN_CORE_PROC, 18, -1}, - {38, 1, 0, 7, MAIN_CORE_PROC, 7, -1}, {39, 3, 1, 19, MAIN_CORE_PROC, 19, -1}, - {40, 1, 0, 8, MAIN_CORE_PROC, 8, -1}, {41, 3, 1, 20, MAIN_CORE_PROC, 20, -1}, - {42, 1, 0, 9, MAIN_CORE_PROC, 9, -1}, {43, 3, 1, 21, MAIN_CORE_PROC, 21, -1}, - {44, 1, 0, 10, MAIN_CORE_PROC, 10, -1}, {45, 3, 1, 22, MAIN_CORE_PROC, 22, -1}, - {46, 1, 0, 11, MAIN_CORE_PROC, 11, -1}, {47, 3, 1, 23, MAIN_CORE_PROC, 23, -1}, - }, - {{48, 24, 0, 24, -1, -1}, {12, 6, 0, 6, 2, 1}, {12, 6, 0, 6, 3, 1}, {12, 6, 0, 6, 0, 0}, {12, 6, 0, 6, 1, 0}}, -}; -LinuxSortProcTableTestCase proc_table_2sockets_24cores_hyperthreading_4 = { - 21, - {{48, 24, 0, 24, -1, -1}, {12, 6, 0, 6, 0, 0}, {12, 6, 0, 6, 1, 0}, {12, 6, 0, 6, 2, 1}, {12, 6, 0, 6, 3, 1}}, - { - {0, 0, 0, 0, HYPER_THREADING_PROC, 0, -1}, {1, 2, 1, 12, HYPER_THREADING_PROC, 12, -1}, - {2, 0, 0, 1, HYPER_THREADING_PROC, 1, -1}, {3, 2, 1, 13, HYPER_THREADING_PROC, 13, -1}, - {4, 0, 0, 2, HYPER_THREADING_PROC, 2, -1}, {5, 2, 1, 14, HYPER_THREADING_PROC, 14, -1}, - {6, 0, 0, 3, HYPER_THREADING_PROC, 3, -1}, {7, 2, 1, 15, HYPER_THREADING_PROC, 15, -1}, - {8, 0, 0, 4, HYPER_THREADING_PROC, 4, -1}, {9, 2, 1, 16, HYPER_THREADING_PROC, 16, -1}, - {10, 0, 0, 5, HYPER_THREADING_PROC, 5, -1}, {11, 2, 1, 17, HYPER_THREADING_PROC, 17, -1}, - {12, 1, 0, 6, HYPER_THREADING_PROC, 6, -1}, {13, 3, 1, 18, HYPER_THREADING_PROC, 18, -1}, - {14, 1, 0, 7, HYPER_THREADING_PROC, 7, -1}, {15, 3, 1, 19, HYPER_THREADING_PROC, 19, -1}, - {16, 1, 0, 8, HYPER_THREADING_PROC, 8, -1}, {17, 3, 1, 20, HYPER_THREADING_PROC, 20, -1}, - {18, 1, 0, 9, HYPER_THREADING_PROC, 9, -1}, {19, 3, 1, 21, HYPER_THREADING_PROC, 21, -1}, - {20, 1, 0, 10, HYPER_THREADING_PROC, 10, -1}, {21, 3, 1, 22, HYPER_THREADING_PROC, 22, -1}, - {22, 1, 0, 11, HYPER_THREADING_PROC, 11, -1}, {23, 3, 1, 23, HYPER_THREADING_PROC, 23, -1}, - {24, 0, 0, 0, MAIN_CORE_PROC, 0, -1}, {25, 2, 1, 12, MAIN_CORE_PROC, 12, -1}, - {26, 0, 0, 1, MAIN_CORE_PROC, 1, -1}, {27, 2, 1, 13, MAIN_CORE_PROC, 13, -1}, - {28, 0, 0, 2, MAIN_CORE_PROC, 2, -1}, {29, 2, 1, 14, MAIN_CORE_PROC, 14, -1}, - {30, 0, 0, 3, MAIN_CORE_PROC, 3, -1}, {31, 2, 1, 15, MAIN_CORE_PROC, 15, -1}, - {32, 0, 0, 4, MAIN_CORE_PROC, 4, -1}, {33, 2, 1, 16, MAIN_CORE_PROC, 16, -1}, - {34, 0, 0, 5, MAIN_CORE_PROC, 5, -1}, {35, 2, 1, 17, MAIN_CORE_PROC, 17, -1}, - {36, 1, 0, 6, MAIN_CORE_PROC, 6, -1}, {37, 3, 1, 18, MAIN_CORE_PROC, 18, -1}, - {38, 1, 0, 7, MAIN_CORE_PROC, 7, -1}, {39, 3, 1, 19, MAIN_CORE_PROC, 19, -1}, - {40, 1, 0, 8, MAIN_CORE_PROC, 8, -1}, {41, 3, 1, 20, MAIN_CORE_PROC, 20, -1}, - {42, 1, 0, 9, MAIN_CORE_PROC, 9, -1}, {43, 3, 1, 21, MAIN_CORE_PROC, 21, -1}, - {44, 1, 0, 10, MAIN_CORE_PROC, 10, -1}, {45, 3, 1, 22, MAIN_CORE_PROC, 22, -1}, - {46, 1, 0, 11, MAIN_CORE_PROC, 11, -1}, {47, 3, 1, 23, MAIN_CORE_PROC, 23, -1}, - }, - {{48, 24, 0, 24, -1, -1}, {12, 6, 0, 6, 3, 1}, {12, 6, 0, 6, 0, 0}, {12, 6, 0, 6, 1, 0}, {12, 6, 0, 6, 2, 1}}, -}; - -TEST_P(LinuxSortProcTableTests, LinuxProcTable) {} - -INSTANTIATE_TEST_SUITE_P(CPUMap, - LinuxSortProcTableTests, - testing::Values(proc_table_2sockets_24cores_hyperthreading_1, - proc_table_2sockets_24cores_hyperthreading_2, - proc_table_2sockets_24cores_hyperthreading_3, - proc_table_2sockets_24cores_hyperthreading_4)); -#endif -} // namespace ov diff --git a/src/plugins/intel_cpu/src/cpu_streams_calculation.cpp b/src/plugins/intel_cpu/src/cpu_streams_calculation.cpp index 3af6a52d5f3342..9cd77b053064e2 100644 --- a/src/plugins/intel_cpu/src/cpu_streams_calculation.cpp +++ b/src/plugins/intel_cpu/src/cpu_streams_calculation.cpp @@ -27,13 +27,25 @@ using namespace ov::threading; namespace ov { namespace intel_cpu { +void sort_table_by_numa_node_id(const int current_numa_node, std::vector>& proc_type_table) { + if (proc_type_table.size() > 1) { + for (size_t i = 1; i < proc_type_table.size(); i++) { + if (current_numa_node == proc_type_table[i][PROC_NUMA_NODE_ID]) { + std::rotate(proc_type_table.begin() + 1, proc_type_table.begin() + i, proc_type_table.end()); + break; + } + } + } + + return; +}; + std::vector> get_streams_info_table( const int input_streams, const bool input_streams_changed, const int input_threads, const int input_infer_requests, const int model_prefer_threads, - const int input_current_socket_id, const std::string input_perf_hint, const std::set hint_model_distribution_policy, const std::vector>& proc_type_table) { @@ -176,11 +188,7 @@ std::vector> get_streams_info_table( std::unordered_set socket_id_list(proc_type_table.size()); for (size_t i = 1; i < proc_type_table.size(); i++) { if (!socket_id_list.count(proc_type_table[i][PROC_SOCKET_ID])) { - if (proc_type_table[i][PROC_SOCKET_ID] == input_current_socket_id) { - proc_socket_table.insert(proc_socket_table.begin(), proc_type_table[i]); - } else { - proc_socket_table.push_back(proc_type_table[i]); - } + proc_socket_table.push_back(proc_type_table[i]); socket_id_list.insert(proc_type_table[i][PROC_SOCKET_ID]); } else { for (auto& row : proc_socket_table) { @@ -202,7 +210,12 @@ std::vector> get_streams_info_table( ((input_streams_changed == true) && (input_streams == 1))) { n_streams = 1; stream_info[NUMBER_OF_STREAMS] = n_streams; - current_socket_id = input_current_socket_id == -1 ? get_current_socket_id() : input_current_socket_id; + for (size_t n = 0; n < proc_socket_table.size(); n++) { + if (proc_socket_table[n][ALL_PROC] > 0) { + current_socket_id = proc_socket_table[n][PROC_SOCKET_ID]; + break; + } + } if (input_threads > 0) { if (hint_model_distribution_policy.size() == 0) { n_threads_per_stream = std::min(input_threads, proc_type_table[0][ALL_PROC]); @@ -667,7 +680,7 @@ int get_model_prefer_threads(const int num_streams, } std::vector> generate_stream_info(const int streams, - const int input_current_socket_id, + const int input_numa_node_id, const std::shared_ptr& model, Config& config, std::vector>& proc_type_table, @@ -683,12 +696,16 @@ std::vector> generate_stream_info(const int streams, model_prefer_threads = get_model_prefer_threads(streams, proc_type_table, model, config); } + if (proc_type_table.size() > 1) { + const auto cur_numa_node_id = input_numa_node_id < 0 ? get_current_numa_node_id() : input_numa_node_id; + sort_table_by_numa_node_id(cur_numa_node_id, proc_type_table); + } + auto streams_info_table = get_streams_info_table(config.streams, config.streamsChanged, config.threads, config.hintNumRequests, model_prefer_threads, - input_current_socket_id, ov::util::to_string(config.hintPerfMode), config.modelDistributionPolicy, proc_type_table); diff --git a/src/plugins/intel_cpu/src/cpu_streams_calculation.hpp b/src/plugins/intel_cpu/src/cpu_streams_calculation.hpp index 0a0b4a1449b7cb..347e52164c6641 100644 --- a/src/plugins/intel_cpu/src/cpu_streams_calculation.hpp +++ b/src/plugins/intel_cpu/src/cpu_streams_calculation.hpp @@ -35,8 +35,6 @@ namespace intel_cpu { * function. * - input "0" indicates that the function generates the optimal number of threads per stream based on * processors type information. - * @param[in] input_current_socket_id is the socket ID in cpu mapping table of the currently running thread - * - input "-1" indicates that the function get_streams_info_table will query this id internally. * @param[in] input_perf_hint is performance hint set by user via ov::hint::performance_mode or the default value. * @param[in] hint_llm_distribution_policy is the distribution policy for Large language models * @param[in] proc_type_table is currently available candidate processors. @@ -50,7 +48,6 @@ std::vector> get_streams_info_table( const int input_threads, const int input_infer_requests, const int model_prefer_threads, - const int input_current_socket_id, const std::string input_perf_hint, const std::set hint_llm_distribution_policy, const std::vector>& proc_type_table); @@ -85,7 +82,7 @@ int get_model_prefer_threads(const int num_streams, /** * @brief Generate streams information according to processors type table * @param[in] streams number of streams - * @param[in] input_current_socket_id is the socket ID in cpu mapping table of the currently running thread + * @param[in] input_numa_node_id is the numa node ID in cpu mapping table of the currently running thread * - input "-1" indicates that the function get_streams_info_table will query this id internally. * @param[in] model graph handle * @param[in] config intel cpu configuration @@ -95,7 +92,7 @@ int get_model_prefer_threads(const int num_streams, * ov::hint::enable_hyper_threading */ std::vector> generate_stream_info(const int streams, - const int input_current_socket_id, + const int input_numa_node_id, const std::shared_ptr& model, Config& config, std::vector>& proc_type_table, @@ -109,5 +106,13 @@ std::vector> generate_stream_info(const int streams, */ void get_num_streams(const int streams, const std::shared_ptr& model, Config& config); +/** + * @brief Sort proc_type_table by numa node id on which application is running. The numa node will move to first + * row. + * @param[in] current_numa_node numa node ID on which application is running. + * @param[in] proc_type_table summary table of number of processors per type + */ +void sort_table_by_numa_node_id(const int current_numa_node, std::vector>& proc_type_table); + } // namespace intel_cpu } // namespace ov diff --git a/src/plugins/intel_cpu/tests/unit/streams_info/streams_e2e_test.cpp b/src/plugins/intel_cpu/tests/unit/streams_info/streams_e2e_test.cpp index 7fd491e934f336..9242fd7fd46bc9 100644 --- a/src/plugins/intel_cpu/tests/unit/streams_info/streams_e2e_test.cpp +++ b/src/plugins/intel_cpu/tests/unit/streams_info/streams_e2e_test.cpp @@ -21,7 +21,7 @@ struct StreamGenerateionTestCase { int input_thread; int input_request; int input_model_prefer; - int input_socket_id; + int input_numa_node_id; ov::hint::SchedulingCoreType input_type; bool input_ht_value; bool input_ht_changed; @@ -65,7 +65,7 @@ class StreamGenerationTests : public ov::test::TestsCommon, cpu._proc_type_table = test_data.input_proc_type_table; auto proc_type_table = ov::intel_cpu::generate_stream_info(test_data.input_stream, - test_data.input_socket_id, + test_data.input_numa_node_id, nullptr, config, test_data.input_proc_type_table, diff --git a/src/plugins/intel_cpu/tests/unit/streams_info/streams_info_table_test.cpp b/src/plugins/intel_cpu/tests/unit/streams_info/streams_info_table_test.cpp index 7dc643c181df7e..7034cc3854c611 100644 --- a/src/plugins/intel_cpu/tests/unit/streams_info/streams_info_table_test.cpp +++ b/src/plugins/intel_cpu/tests/unit/streams_info/streams_info_table_test.cpp @@ -20,7 +20,6 @@ struct StreamsCalculationTestCase { int input_threads; int input_infer_requests; int model_prefer_threads; - int input_socket_id; std::string input_perf_hint; std::set hint_llm_distribution_policy; std::vector> proc_type_table; @@ -39,7 +38,6 @@ class StreamsCalculationTests : public ov::test::TestsCommon, test_data.input_threads, test_data.input_infer_requests, test_data.model_prefer_threads, - test_data.input_socket_id, test_data.input_perf_hint, test_data.hint_llm_distribution_policy, test_data.proc_type_table); @@ -55,7 +53,6 @@ StreamsCalculationTestCase _2sockets_104cores_latency_auto_1 = { 0, // param[in]: the number of threads in this simulation 0, // param[in]: the number of infer requests in this simulation 0, // param[in]: the model preferred number of threads in this simulation - 0, // param[in]: the current socket id of the running thread in this simulation "LATENCY", // param[in]: the performance hint in this simulation {ov::hint::ModelDistributionPolicy::TENSOR_PARALLEL}, // param[in]: the hint of max threads per stream in this // simulation @@ -74,7 +71,6 @@ StreamsCalculationTestCase _2sockets_104cores_latency_auto_2 = { 0, 0, 0, - 0, "LATENCY", {ov::hint::ModelDistributionPolicy::TENSOR_PARALLEL}, {{104, 104, 0, 0, -1, -1}, {52, 52, 0, 0, 0, 0}, {52, 52, 0, 0, 1, 1}}, @@ -86,7 +82,6 @@ StreamsCalculationTestCase _2sockets_104cores_latency_auto_3 = { 0, 0, 0, - 0, "LATENCY", {ov::hint::ModelDistributionPolicy::TENSOR_PARALLEL}, {{208, 104, 0, 104, -1, -1}, @@ -108,7 +103,6 @@ StreamsCalculationTestCase _2sockets_104cores_latency_auto_4 = { 0, 0, 0, - 0, "LATENCY", {ov::hint::ModelDistributionPolicy::TENSOR_PARALLEL}, {{104, 104, 0, 0, -1, -1}, {26, 26, 0, 0, 0, 0}, {26, 26, 0, 0, 1, 0}, {26, 26, 0, 0, 2, 1}, {26, 26, 0, 0, 3, 1}}, @@ -126,7 +120,6 @@ StreamsCalculationTestCase _2sockets_104cores_latency_platform_1 = { 0, 0, 0, - 0, "LATENCY", {}, {{208, 104, 0, 104, -1, -1}, {104, 52, 0, 52, 0, 0}, {104, 52, 0, 52, 1, 1}}, @@ -138,7 +131,6 @@ StreamsCalculationTestCase _2sockets_104cores_latency_platform_2 = { 0, 0, 0, - 0, "LATENCY", {}, {{104, 104, 0, 0, -1, -1}, {52, 52, 0, 0, 0, 0}, {52, 52, 0, 0, 1, 1}}, @@ -150,7 +142,6 @@ StreamsCalculationTestCase _2sockets_104cores_latency_platform_3 = { 0, 0, 0, - 0, "LATENCY", {}, {{208, 104, 0, 104, -1, -1}, @@ -170,7 +161,6 @@ StreamsCalculationTestCase _2sockets_104cores_latency_platform_4 = { 0, 0, 0, - 0, "LATENCY", {}, {{104, 104, 0, 0, -1, -1}, {26, 26, 0, 0, 0, 0}, {26, 26, 0, 0, 1, 0}, {26, 26, 0, 0, 2, 1}, {26, 26, 0, 0, 3, 1}}, @@ -182,7 +172,6 @@ StreamsCalculationTestCase _2sockets_104cores_latency_socket_1 = { 0, 0, 0, - 0, "LATENCY", {}, {{208, 104, 0, 104, -1, -1}, {104, 52, 0, 52, 0, 0}, {104, 52, 0, 52, 1, 1}}, @@ -194,7 +183,6 @@ StreamsCalculationTestCase _2sockets_104cores_latency_socket_2 = { 0, 0, 0, - 0, "LATENCY", {}, {{104, 104, 0, 0, -1, -1}, {52, 52, 0, 0, 0, 0}, {52, 52, 0, 0, 1, 1}}, @@ -206,7 +194,6 @@ StreamsCalculationTestCase _2sockets_104cores_latency_socket_3 = { 0, 0, 0, - 0, "LATENCY", {}, {{208, 104, 0, 104, -1, -1}, @@ -226,7 +213,6 @@ StreamsCalculationTestCase _2sockets_104cores_latency_socket_4 = { 0, 0, 0, - 0, "LATENCY", {}, {{104, 104, 0, 0, -1, -1}, {26, 26, 0, 0, 0, 0}, {26, 26, 0, 0, 1, 0}, {26, 26, 0, 0, 2, 1}, {26, 26, 0, 0, 3, 1}}, @@ -238,7 +224,6 @@ StreamsCalculationTestCase _2sockets_104cores_latency_socket_5 = { 0, 0, 0, - 0, "LATENCY", {}, {{60, 60, 0, 0, -1, -1}, {10, 10, 0, 0, 0, 0}, {10, 10, 0, 0, 1, 0}, {20, 20, 0, 0, 2, 1}, {20, 20, 0, 0, 3, 1}}, @@ -250,7 +235,6 @@ StreamsCalculationTestCase _2sockets_104cores_latency_socket_6 = { 0, 0, 0, - 0, "LATENCY", {}, {{60, 60, 0, 0, -1, -1}, {10, 10, 0, 0, 0, 0}, {20, 20, 0, 0, 1, 1}, {10, 10, 0, 0, 2, 0}, {20, 20, 0, 0, 3, 1}}, @@ -262,7 +246,6 @@ StreamsCalculationTestCase _2sockets_104cores_latency_socket_7 = { 0, 0, 0, - 0, "LATENCY", {}, {{104, 104, 0, 0, -1, -1}, {26, 26, 0, 0, 0, 0}, {26, 26, 0, 0, 1, 0}, {26, 26, 0, 0, 2, 1}, {26, 26, 0, 0, 3, 1}}, @@ -274,7 +257,6 @@ StreamsCalculationTestCase _2sockets_104cores_latency_socket_8 = { 208, 0, 0, - 0, "LATENCY", {}, {{208, 104, 0, 104, -1, -1}, {104, 52, 0, 52, 0, 0}, {104, 52, 0, 52, 1, 1}}, @@ -290,7 +272,6 @@ StreamsCalculationTestCase _2sockets_104cores_latency_socket_9 = { 104, 0, 0, - 0, "LATENCY", {}, {{208, 104, 0, 104, -1, -1}, {104, 52, 0, 52, 0, 0}, {104, 52, 0, 52, 1, 1}}, @@ -302,7 +283,6 @@ StreamsCalculationTestCase _2sockets_104cores_latency_socket_10 = { 52, 0, 0, - 0, "LATENCY", {}, {{208, 104, 0, 104, -1, -1}, {104, 52, 0, 52, 0, 0}, {104, 52, 0, 52, 1, 1}}, @@ -315,7 +295,6 @@ StreamsCalculationTestCase _2sockets_104cores_latency_1 = { 20, 0, 0, - 0, "LATENCY", {}, {{208, 104, 0, 104, -1, -1}, {104, 52, 0, 52, 0, 0}, {104, 52, 0, 52, 1, 1}}, @@ -327,7 +306,6 @@ StreamsCalculationTestCase _2sockets_104cores_latency_2 = { 20, 5, 0, - 0, "LATENCY", {}, {{208, 104, 0, 104, -1, -1}, {104, 52, 0, 52, 0, 0}, {104, 52, 0, 52, 1, 1}}, @@ -339,7 +317,6 @@ StreamsCalculationTestCase _2sockets_104cores_latency_4 = { 20, 0, 0, - 0, "LATENCY", {}, {{208, 104, 0, 104, -1, -1}, {104, 52, 0, 52, 0, 0}, {104, 52, 0, 52, 1, 1}}, @@ -351,7 +328,6 @@ StreamsCalculationTestCase _2sockets_104cores_latency_5 = { 20, 5, 0, - 0, "LATENCY", {}, {{208, 104, 0, 104, -1, -1}, {104, 52, 0, 52, 0, 0}, {104, 52, 0, 52, 1, 1}}, @@ -363,7 +339,6 @@ StreamsCalculationTestCase _2sockets_104cores_latency_6 = { 208, 0, 0, - 0, "LATENCY", {}, {{208, 104, 0, 104, -1, -1}, {104, 52, 0, 52, 0, 0}, {104, 52, 0, 52, 1, 1}}, @@ -379,7 +354,6 @@ StreamsCalculationTestCase _2sockets_104cores_tput_1 = { 0, 0, 0, - 0, "THROUGHPUT", {}, {{208, 104, 0, 104, -1, -1}, {104, 52, 0, 52, 0, 0}, {104, 52, 0, 52, 1, 1}}, @@ -394,7 +368,6 @@ StreamsCalculationTestCase _2sockets_104cores_tput_2 = { 0, 0, 0, - 0, "THROUGHPUT", {}, {{208, 104, 0, 104, -1, -1}, {104, 52, 0, 52, 0, 0}, {104, 52, 0, 52, 1, 1}}, @@ -411,7 +384,6 @@ StreamsCalculationTestCase _2sockets_104cores_tput_3 = { 20, 0, 0, - 0, "THROUGHPUT", {}, {{208, 104, 0, 104, -1, -1}, {104, 52, 0, 52, 0, 0}, {104, 52, 0, 52, 1, 1}}, @@ -423,7 +395,6 @@ StreamsCalculationTestCase _2sockets_104cores_tput_4 = { 20, 0, 0, - 0, "THROUGHPUT", {}, {{208, 104, 0, 104, -1, -1}, {104, 52, 0, 52, 0, 0}, {104, 52, 0, 52, 1, 1}}, @@ -435,7 +406,6 @@ StreamsCalculationTestCase _2sockets_104cores_tput_5 = { 0, 0, 1, - 0, "THROUGHPUT", {}, {{208, 104, 0, 104, -1, -1}, {104, 52, 0, 52, 0, 0}, {104, 52, 0, 52, 1, 1}}, @@ -450,7 +420,6 @@ StreamsCalculationTestCase _2sockets_104cores_tput_6 = { 0, 0, 2, - 0, "THROUGHPUT", {}, {{208, 104, 0, 104, -1, -1}, {104, 52, 0, 52, 0, 0}, {104, 52, 0, 52, 1, 1}}, @@ -465,7 +434,6 @@ StreamsCalculationTestCase _2sockets_104cores_tput_7 = { 0, 0, 8, - 0, "THROUGHPUT", {}, {{208, 104, 0, 104, -1, -1}, {104, 52, 0, 52, 0, 0}, {104, 52, 0, 52, 1, 1}}, @@ -486,7 +454,6 @@ StreamsCalculationTestCase _2sockets_104cores_tput_7_1 = { 0, 0, 8, - 0, "THROUGHPUT", {}, {{208, 104, 0, 104, -1, -1}, {104, 52, 0, 52, 0, 0}, {104, 52, 0, 52, 1, 1}}, @@ -507,7 +474,6 @@ StreamsCalculationTestCase _2sockets_104cores_tput_7_2 = { 0, 0, 4, - 0, "THROUGHPUT", {}, {{208, 104, 0, 104, -1, -1}, @@ -529,7 +495,6 @@ StreamsCalculationTestCase _2sockets_104cores_tput_8 = { 40, 0, 8, - 0, "THROUGHPUT", {}, {{208, 104, 0, 104, -1, -1}, {104, 52, 0, 52, 0, 0}, {104, 52, 0, 52, 1, 1}}, @@ -542,7 +507,6 @@ StreamsCalculationTestCase _2sockets_104cores_tput_9 = { 20, 2, 0, - 0, "THROUGHPUT", {}, {{208, 104, 0, 104, -1, -1}, {104, 52, 0, 52, 0, 0}, {104, 52, 0, 52, 1, 1}}, @@ -555,7 +519,6 @@ StreamsCalculationTestCase _2sockets_104cores_tput_10 = { 0, 2, 0, - 0, "THROUGHPUT", {}, {{208, 104, 0, 104, -1, -1}, {104, 52, 0, 52, 0, 0}, {104, 52, 0, 52, 1, 1}}, @@ -573,7 +536,6 @@ StreamsCalculationTestCase _2sockets_104cores_tput_11 = { 0, 5, 0, - 0, "THROUGHPUT", {}, {{208, 104, 0, 104, -1, -1}, {104, 52, 0, 52, 0, 0}, {104, 52, 0, 52, 1, 1}}, @@ -591,7 +553,6 @@ StreamsCalculationTestCase _2sockets_104cores_tput_12 = { 0, 2, 2, - 0, "THROUGHPUT", {}, {{208, 104, 0, 104, -1, -1}, {104, 52, 0, 52, 0, 0}, {104, 52, 0, 52, 1, 1}}, @@ -609,7 +570,6 @@ StreamsCalculationTestCase _2sockets_104cores_tput_13 = { 0, 0, 0, - 0, "THROUGHPUT", {}, {{104, 104, 0, 0, -1, -1}, {52, 52, 0, 0, 0, 0}, {52, 52, 0, 0, 1, 1}}, @@ -622,7 +582,6 @@ StreamsCalculationTestCase _2sockets_104cores_tput_14 = { 0, 0, 0, - 0, "THROUGHPUT", {}, {{104, 104, 0, 0, -1, -1}, {52, 52, 0, 0, 0, 0}, {52, 52, 0, 0, 1, 1}}, @@ -635,7 +594,6 @@ StreamsCalculationTestCase _2sockets_104cores_tput_15 = { 0, 0, 1, - 0, "THROUGHPUT", {}, {{104, 104, 0, 0, -1, -1}, {52, 52, 0, 0, 0, 0}, {52, 52, 0, 0, 1, 1}}, @@ -648,7 +606,6 @@ StreamsCalculationTestCase _2sockets_104cores_tput_16 = { 0, 0, 2, - 0, "THROUGHPUT", {}, {{104, 104, 0, 0, -1, -1}, {52, 52, 0, 0, 0, 0}, {52, 52, 0, 0, 1, 1}}, @@ -661,7 +618,6 @@ StreamsCalculationTestCase _2sockets_104cores_tput_17 = { 0, 0, 8, - 0, "THROUGHPUT", {}, {{104, 104, 0, 0, -1, -1}, {52, 52, 0, 0, 0, 0}, {52, 52, 0, 0, 1, 1}}, @@ -678,7 +634,6 @@ StreamsCalculationTestCase _2sockets_104cores_tput_18 = { 0, 2, 0, - 0, "THROUGHPUT", {}, {{104, 104, 0, 0, -1, -1}, {52, 52, 0, 0, 0, 0}, {52, 52, 0, 0, 1, 1}}, @@ -691,7 +646,6 @@ StreamsCalculationTestCase _2sockets_104cores_tput_19 = { 0, 5, 0, - 0, "THROUGHPUT", {}, {{104, 104, 0, 0, -1, -1}, {52, 52, 0, 0, 0, 0}, {52, 52, 0, 0, 1, 1}}, @@ -704,7 +658,6 @@ StreamsCalculationTestCase _2sockets_104cores_tput_20 = { 0, 2, 2, - 0, "THROUGHPUT", {}, {{104, 104, 0, 0, -1, -1}, {52, 52, 0, 0, 0, 0}, {52, 52, 0, 0, 1, 1}}, @@ -717,7 +670,6 @@ StreamsCalculationTestCase _2sockets_48cores_latency_1 = { 0, 0, 0, - 0, "LATENCY", {}, {{48, 48, 0, 0, -1, -1}, {24, 24, 0, 0, 0, 0}, {24, 24, 0, 0, 1, 1}}, @@ -729,7 +681,6 @@ StreamsCalculationTestCase _2sockets_48cores_latency_2 = { 0, 0, 0, - 0, "LATENCY", {}, {{48, 48, 0, 0, -1, -1}, {24, 24, 0, 0, 0, 0}, {24, 24, 0, 0, 1, 1}}, @@ -741,7 +692,6 @@ StreamsCalculationTestCase _2sockets_48cores_latency_3 = { 96, 0, 0, - 0, "LATENCY", {}, {{48, 48, 0, 0, -1, -1}, {24, 24, 0, 0, 0, 0}, {24, 24, 0, 0, 1, 1}}, @@ -753,7 +703,6 @@ StreamsCalculationTestCase _2sockets_48cores_tput_1 = { 0, 0, 0, - 0, "THROUGHPUT", {}, {{48, 48, 0, 0, -1, -1}, {24, 24, 0, 0, 0, 0}, {24, 24, 0, 0, 1, 1}}, @@ -766,7 +715,6 @@ StreamsCalculationTestCase _2sockets_48cores_tput_2 = { 0, 0, 0, - 0, "THROUGHPUT", {}, {{48, 48, 0, 0, -1, -1}, {24, 24, 0, 0, 0, 0}, {24, 24, 0, 0, 1, 1}}, @@ -779,7 +727,6 @@ StreamsCalculationTestCase _2sockets_48cores_tput_3 = { 100, 0, 0, - 0, "THROUGHPUT", {}, {{48, 48, 0, 0, -1, -1}, {24, 24, 0, 0, 0, 0}, {24, 24, 0, 0, 1, 1}}, @@ -792,7 +739,6 @@ StreamsCalculationTestCase _2sockets_48cores_tput_4 = { 20, 0, 1, - 0, "THROUGHPUT", {}, {{48, 48, 0, 0, -1, -1}, {24, 24, 0, 0, 0, 0}, {24, 24, 0, 0, 1, 1}}, @@ -805,7 +751,6 @@ StreamsCalculationTestCase _2sockets_20cores_tput_1 = { 0, 0, 0, - 0, "THROUGHPUT", {}, {{20, 20, 0, 0, -1, -1}, {10, 10, 0, 0, 0, 0}, {10, 10, 0, 0, 1, 1}}, @@ -818,7 +763,6 @@ StreamsCalculationTestCase _1sockets_14cores_latency_1 = { 0, 0, 0, - 0, "LATENCY", {}, {{14, 6, 8, 0, 0, 0}}, @@ -831,7 +775,6 @@ StreamsCalculationTestCase _1sockets_14cores_latency_2 = { 10, 0, 0, - 0, "LATENCY", {}, {{20, 6, 8, 6, 0, 0}}, @@ -844,7 +787,6 @@ StreamsCalculationTestCase _1sockets_14cores_latency_3 = { 0, 0, 6, - 0, "LATENCY", {}, {{20, 6, 8, 6, 0, 0}}, @@ -857,7 +799,6 @@ StreamsCalculationTestCase _1sockets_14cores_latency_4 = { 0, 0, 14, - 0, "LATENCY", {}, {{20, 6, 8, 6, 0, 0}}, @@ -873,7 +814,6 @@ StreamsCalculationTestCase _1sockets_14cores_latency_5 = { 0, 2, 14, - 0, "LATENCY", {}, {{20, 6, 8, 6, 0, 0}}, @@ -889,7 +829,6 @@ StreamsCalculationTestCase _1sockets_14cores_latency_6 = { 0, 0, 0, - 0, "LATENCY", {}, {{20, 6, 8, 6, 0, 0}}, @@ -905,7 +844,6 @@ StreamsCalculationTestCase _1sockets_14cores_latency_7 = { 0, 0, 6, - 0, "LATENCY", {}, {{14, 6, 8, 0, 0, 0}}, @@ -918,7 +856,6 @@ StreamsCalculationTestCase _1sockets_14cores_latency_8 = { 0, 0, 14, - 0, "LATENCY", {}, {{14, 6, 8, 0, 0, 0}}, @@ -931,7 +868,6 @@ StreamsCalculationTestCase _1sockets_14cores_latency_9 = { 0, 2, 14, - 0, "LATENCY", {}, {{14, 6, 8, 0, 0, 0}}, @@ -944,7 +880,6 @@ StreamsCalculationTestCase _1sockets_14cores_latency_10 = { 0, 0, 0, - 0, "LATENCY", {}, {{14, 6, 8, 0, 0, 0}}, @@ -957,7 +892,6 @@ StreamsCalculationTestCase _1sockets_14cores_latency_11 = { 10, 0, 0, - 0, "LATENCY", {}, {{20, 6, 8, 6, 0, 0}}, @@ -970,7 +904,6 @@ StreamsCalculationTestCase _1sockets_14cores_latency_12 = { 0, 0, 6, - 0, "LATENCY", {}, {{20, 6, 8, 6, 0, 0}}, @@ -983,7 +916,6 @@ StreamsCalculationTestCase _1sockets_14cores_latency_13 = { 0, 0, 14, - 0, "LATENCY", {}, {{20, 6, 8, 6, 0, 0}}, @@ -999,7 +931,6 @@ StreamsCalculationTestCase _1sockets_14cores_latency_14 = { 0, 2, 14, - 0, "LATENCY", {}, {{20, 6, 8, 6, 0, 0}}, @@ -1015,7 +946,6 @@ StreamsCalculationTestCase _1sockets_14cores_latency_15 = { 0, 0, 0, - 0, "LATENCY", {}, {{20, 6, 8, 6, 0, 0}}, @@ -1031,7 +961,6 @@ StreamsCalculationTestCase _1sockets_14cores_latency_16 = { 0, 0, 6, - 0, "LATENCY", {}, {{14, 6, 8, 0, 0, 0}}, @@ -1044,7 +973,6 @@ StreamsCalculationTestCase _1sockets_14cores_latency_17 = { 0, 0, 14, - 0, "LATENCY", {}, {{14, 6, 8, 0, 0, 0}}, @@ -1057,7 +985,6 @@ StreamsCalculationTestCase _1sockets_14cores_latency_18 = { 0, 2, 14, - 0, "LATENCY", {}, {{14, 6, 8, 0, 0, 0}}, @@ -1070,7 +997,6 @@ StreamsCalculationTestCase _1sockets_14cores_tput_1 = { 0, 0, 0, - 0, "THROUGHPUT", {}, {{20, 6, 8, 6, 0, 0}}, @@ -1083,7 +1009,6 @@ StreamsCalculationTestCase _1sockets_14cores_tput_2 = { 0, 0, 0, - 0, "THROUGHPUT", {}, {{20, 6, 8, 6, 0, 0}}, @@ -1096,7 +1021,6 @@ StreamsCalculationTestCase _1sockets_14cores_tput_3 = { 0, 0, 0, - 0, "THROUGHPUT", {}, {{20, 6, 8, 6, 0, 0}}, @@ -1109,7 +1033,6 @@ StreamsCalculationTestCase _1sockets_14cores_tput_4 = { 12, 0, 0, - 0, "THROUGHPUT", {}, {{20, 6, 8, 6, 0, 0}}, @@ -1122,7 +1045,6 @@ StreamsCalculationTestCase _1sockets_14cores_tput_5 = { 0, 0, 1, - 0, "THROUGHPUT", {}, {{20, 6, 8, 6, 0, 0}}, @@ -1135,7 +1057,6 @@ StreamsCalculationTestCase _1sockets_14cores_tput_6 = { 0, 0, 2, - 0, "THROUGHPUT", {}, {{20, 6, 8, 6, 0, 0}}, @@ -1148,7 +1069,6 @@ StreamsCalculationTestCase _1sockets_14cores_tput_7 = { 0, 0, 0, - 0, "THROUGHPUT", {}, {{20, 6, 8, 6, 0, 0}}, @@ -1161,7 +1081,6 @@ StreamsCalculationTestCase _1sockets_14cores_tput_8 = { 100, 0, 0, - 0, "THROUGHPUT", {}, {{20, 6, 8, 6, 0, 0}}, @@ -1174,7 +1093,6 @@ StreamsCalculationTestCase _1sockets_14cores_tput_9 = { 0, 8, 0, - 0, "THROUGHPUT", {}, {{20, 6, 8, 6, 0, 0}}, @@ -1187,7 +1105,6 @@ StreamsCalculationTestCase _1sockets_14cores_tput_10 = { 0, 4, 0, - 0, "THROUGHPUT", {}, {{20, 6, 8, 6, 0, 0}}, @@ -1200,7 +1117,6 @@ StreamsCalculationTestCase _1sockets_14cores_tput_11 = { 0, 2, 0, - 0, "THROUGHPUT", {}, {{20, 6, 8, 6, 0, 0}}, @@ -1213,7 +1129,6 @@ StreamsCalculationTestCase _1sockets_14cores_tput_12 = { 0, 2, 2, - 0, "THROUGHPUT", {}, {{20, 6, 8, 6, 0, 0}}, @@ -1226,7 +1141,6 @@ StreamsCalculationTestCase _1sockets_14cores_tput_13 = { 1, 0, 1, - 0, "THROUGHPUT", {}, {{20, 6, 8, 6, 0, 0}}, @@ -1239,7 +1153,6 @@ StreamsCalculationTestCase _1sockets_14cores_tput_14 = { 9, 0, 1, - 0, "THROUGHPUT", {}, {{20, 6, 8, 6, 0, 0}}, @@ -1252,7 +1165,6 @@ StreamsCalculationTestCase _1sockets_14cores_tput_15 = { 12, 0, 1, - 0, "THROUGHPUT", {}, {{20, 6, 8, 6, 0, 0}}, @@ -1265,7 +1177,6 @@ StreamsCalculationTestCase _1sockets_14cores_tput_16 = { 15, 0, 1, - 0, "THROUGHPUT", {}, {{20, 6, 8, 6, 0, 0}}, @@ -1278,7 +1189,6 @@ StreamsCalculationTestCase _1sockets_14cores_tput_17 = { 14, 0, 6, - 0, "LATENCY", {}, {{20, 6, 8, 6, 0, 0}}, @@ -1291,7 +1201,6 @@ StreamsCalculationTestCase _1sockets_10cores_latency_1 = { 0, 0, 0, - 0, "LATENCY", {}, {{12, 2, 8, 2, 0, 0}}, @@ -1307,7 +1216,6 @@ StreamsCalculationTestCase _1sockets_10cores_latency_2 = { 8, 0, 0, - 0, "LATENCY", {}, {{12, 2, 8, 2, 0, 0}}, @@ -1320,7 +1228,6 @@ StreamsCalculationTestCase _1sockets_10cores_latency_3 = { 0, 0, 2, - 0, "LATENCY", {}, {{12, 2, 8, 2, 0, 0}}, @@ -1333,7 +1240,6 @@ StreamsCalculationTestCase _1sockets_10cores_latency_4 = { 0, 0, 10, - 0, "LATENCY", {}, {{12, 2, 8, 2, 0, 0}}, @@ -1349,7 +1255,6 @@ StreamsCalculationTestCase _1sockets_10cores_latency_5 = { 0, 0, 0, - 0, "LATENCY", {}, {{10, 2, 8, 0, 0, 0}}, @@ -1362,7 +1267,6 @@ StreamsCalculationTestCase _1sockets_10cores_latency_6 = { 0, 0, 2, - 0, "LATENCY", {}, {{10, 2, 8, 0, 0, 0}}, @@ -1375,7 +1279,6 @@ StreamsCalculationTestCase _1sockets_10cores_latency_7 = { 0, 0, 10, - 0, "LATENCY", {}, {{10, 2, 8, 0, 0, 0}}, @@ -1388,7 +1291,6 @@ StreamsCalculationTestCase _1sockets_10cores_tput_1 = { 0, 0, 0, - 0, "THROUGHPUT", {}, {{12, 2, 8, 2, 0, 0}}, @@ -1401,7 +1303,6 @@ StreamsCalculationTestCase _1sockets_10cores_tput_2 = { 0, 0, 0, - 0, "THROUGHPUT", {}, {{12, 2, 8, 2, 0, 0}}, @@ -1414,7 +1315,6 @@ StreamsCalculationTestCase _1sockets_10cores_tput_3 = { 0, 0, 0, - 0, "THROUGHPUT", {}, {{12, 2, 8, 2, 0, 0}}, @@ -1427,7 +1327,6 @@ StreamsCalculationTestCase _1sockets_10cores_tput_4 = { 6, 0, 0, - 0, "THROUGHPUT", {}, {{12, 2, 8, 2, 0, 0}}, @@ -1440,7 +1339,6 @@ StreamsCalculationTestCase _1sockets_10cores_tput_5 = { 0, 0, 1, - 0, "THROUGHPUT", {}, {{12, 2, 8, 2, 0, 0}}, @@ -1453,7 +1351,6 @@ StreamsCalculationTestCase _1sockets_10cores_tput_6 = { 0, 0, 2, - 0, "THROUGHPUT", {}, {{12, 2, 8, 2, 0, 0}}, @@ -1466,7 +1363,6 @@ StreamsCalculationTestCase _1sockets_8cores_latency_1 = { 0, 0, 0, - 0, "LATENCY", {}, {{12, 4, 4, 4, 0, 0}}, @@ -1482,7 +1378,6 @@ StreamsCalculationTestCase _1sockets_8cores_latency_2 = { 100, 0, 0, - 0, "LATENCY", {}, {{12, 4, 4, 4, 0, 0}}, @@ -1498,7 +1393,6 @@ StreamsCalculationTestCase _1sockets_8cores_latency_3 = { 0, 0, 4, - 0, "LATENCY", {}, {{12, 4, 4, 4, 0, 0}}, @@ -1511,7 +1405,6 @@ StreamsCalculationTestCase _1sockets_8cores_latency_4 = { 0, 0, 8, - 0, "LATENCY", {}, {{12, 4, 4, 4, 0, 0}}, @@ -1527,7 +1420,6 @@ StreamsCalculationTestCase _1sockets_8cores_latency_5 = { 0, 0, 0, - 0, "LATENCY", {}, {{8, 4, 4, 0, 0, 0}}, @@ -1540,7 +1432,6 @@ StreamsCalculationTestCase _1sockets_8cores_latency_6 = { 0, 0, 4, - 0, "LATENCY", {}, {{8, 4, 4, 0, 0, 0}}, @@ -1553,7 +1444,6 @@ StreamsCalculationTestCase _1sockets_8cores_latency_7 = { 0, 0, 8, - 0, "LATENCY", {}, {{8, 4, 4, 0, 0, 0}}, @@ -1566,7 +1456,6 @@ StreamsCalculationTestCase _1sockets_8cores_tput_1 = { 0, 0, 0, - 0, "THROUGHPUT", {}, {{12, 4, 4, 4, 0, 0}}, @@ -1579,7 +1468,6 @@ StreamsCalculationTestCase _1sockets_8cores_tput_2 = { 0, 0, 0, - 0, "THROUGHPUT", {}, {{12, 4, 4, 4, 0, 0}}, @@ -1592,7 +1480,6 @@ StreamsCalculationTestCase _1sockets_8cores_tput_3 = { 0, 0, 0, - 0, "THROUGHPUT", {}, {{12, 4, 4, 4, 0, 0}}, @@ -1605,7 +1492,6 @@ StreamsCalculationTestCase _1sockets_8cores_tput_4 = { 0, 0, 0, - 0, "THROUGHPUT", {}, {{12, 4, 4, 4, 0, 0}}, @@ -1618,7 +1504,6 @@ StreamsCalculationTestCase _1sockets_8cores_tput_5 = { 6, 0, 0, - 0, "THROUGHPUT", {}, {{12, 4, 4, 4, 0, 0}}, @@ -1631,7 +1516,6 @@ StreamsCalculationTestCase _1sockets_8cores_tput_6 = { 8, 0, 0, - 0, "THROUGHPUT", {}, {{12, 4, 4, 4, 0, 0}}, @@ -1644,7 +1528,6 @@ StreamsCalculationTestCase _1sockets_8cores_tput_7 = { 0, 0, 1, - 0, "THROUGHPUT", {}, {{12, 4, 4, 4, 0, 0}}, @@ -1657,7 +1540,6 @@ StreamsCalculationTestCase _1sockets_8cores_tput_8 = { 0, 0, 0, - 0, "THROUGHPUT", {}, {{8, 4, 4, 0, 0, 0}}, @@ -1670,7 +1552,6 @@ StreamsCalculationTestCase _1sockets_6cores_latency_1 = { 0, 0, 0, - 0, "LATENCY", {}, {{12, 6, 0, 6, 0, 0}}, @@ -1683,7 +1564,6 @@ StreamsCalculationTestCase _1sockets_6cores_latency_2 = { 100, 0, 0, - 0, "LATENCY", {}, {{12, 6, 0, 6, 0, 0}}, @@ -1696,7 +1576,6 @@ StreamsCalculationTestCase _1sockets_6cores_latency_3 = { 0, 0, 0, - 0, "LATENCY", {}, {{6, 6, 0, 0, 0, 0}}, @@ -1709,7 +1588,6 @@ StreamsCalculationTestCase _1sockets_6cores_tput_1 = { 0, 0, 0, - 0, "THROUGHPUT", {}, {{12, 6, 0, 6, 0, 0}}, @@ -1722,7 +1600,6 @@ StreamsCalculationTestCase _1sockets_6cores_tput_2 = { 0, 0, 0, - 0, "THROUGHPUT", {}, {{12, 6, 0, 6, 0, 0}}, @@ -1735,7 +1612,6 @@ StreamsCalculationTestCase _1sockets_6cores_tput_3 = { 8, 0, 0, - 0, "THROUGHPUT", {}, {{12, 6, 0, 6, 0, 0}}, @@ -1748,7 +1624,6 @@ StreamsCalculationTestCase _1sockets_6cores_tput_4 = { 0, 0, 1, - 0, "THROUGHPUT", {}, {{12, 6, 0, 6, 0, 0}}, @@ -1761,7 +1636,6 @@ StreamsCalculationTestCase _1sockets_4cores_latency_1 = { 0, 0, 0, - 0, "LATENCY", {}, {{4, 4, 0, 0, 0, 0}}, @@ -1774,7 +1648,6 @@ StreamsCalculationTestCase _1sockets_4cores_tput_1 = { 0, 0, 0, - 0, "THROUGHPUT", {}, {{4, 4, 0, 0, 0, 0}}, @@ -1787,7 +1660,6 @@ StreamsCalculationTestCase _1sockets_4cores_tput_2 = { 0, 0, 8, - -1, "THROUGHPUT", {}, {{4, 4, 0, 0, 0, 0}}, @@ -1800,7 +1672,6 @@ StreamsCalculationTestCase _1sockets_4cores_tput_3 = { 0, 0, 8, - -1, "THROUGHPUT", {}, {{4, 4, 0, 0, 0, 0}}, @@ -1813,7 +1684,6 @@ StreamsCalculationTestCase _1sockets_ecores_latency_1 = { 0, 0, 0, - 0, "LATENCY", {}, {{16, 0, 16, 0, 0, 0}}, @@ -1826,7 +1696,6 @@ StreamsCalculationTestCase _1sockets_ecores_latency_2 = { 4, 0, 0, - 0, "LATENCY", {}, {{16, 0, 16, 0, 0, 0}}, @@ -1839,7 +1708,6 @@ StreamsCalculationTestCase _1sockets_ecores_latency_3 = { 0, 4, 0, - 0, "LATENCY", {}, {{16, 0, 16, 0, 0, 0}}, @@ -1852,7 +1720,6 @@ StreamsCalculationTestCase _1sockets_ecores_latency_4 = { 0, 0, 4, - 0, "LATENCY", {}, {{16, 0, 16, 0, 0, 0}}, @@ -1865,7 +1732,6 @@ StreamsCalculationTestCase _1sockets_ecores_tput_1 = { 0, 0, 1, - 0, "THROUGHPUT", {}, {{16, 0, 16, 0, 0, 0}}, @@ -1878,7 +1744,6 @@ StreamsCalculationTestCase _1sockets_ecores_tput_2 = { 0, 0, 4, - 0, "THROUGHPUT", {}, {{16, 0, 16, 0, 0, 0}}, @@ -1891,7 +1756,6 @@ StreamsCalculationTestCase _1sockets_ecores_tput_3 = { 0, 0, 0, - 0, "THROUGHPUT", {}, {{16, 0, 16, 0, 0, 0}}, @@ -1904,7 +1768,6 @@ StreamsCalculationTestCase _1sockets_ecores_tput_4 = { 0, 4, 0, - 0, "THROUGHPUT", {}, {{16, 0, 16, 0, 0, 0}}, @@ -1917,7 +1780,6 @@ StreamsCalculationTestCase _1sockets_ecores_tput_5 = { 0, 0, 4, - 0, "THROUGHPUT", {}, {{16, 0, 16, 0, 0, 0}}, @@ -1930,7 +1792,6 @@ StreamsCalculationTestCase _1sockets_mock_tput_1 = { 15, 0, 1, - 0, "THROUGHPUT", {}, {{20, 6, 7, 6, 0, 0}}, @@ -1943,7 +1804,6 @@ StreamsCalculationTestCase _1sockets_mock_tput_2 = { 0, 0, 0, - 0, "THROUGHPUT", {}, {{27, 27, 0, 0, -1, -1}, {19, 19, 0, 0, 0, 0}, {8, 8, 0, 0, 1, 1}}, @@ -1956,7 +1816,6 @@ StreamsCalculationTestCase _1sockets_mock_tput_3 = { 0, 0, 0, - 0, "THROUGHPUT", {}, {{19, 19, 0, 0, -1, -1}, {11, 11, 0, 0, 0, 0}, {8, 8, 0, 0, 1, 1}}, @@ -1969,7 +1828,6 @@ StreamsCalculationTestCase _1sockets_mock_tput_4 = { 0, 0, 0, - 0, "THROUGHPUT", {}, {{8, 8, 0, 0, 0, 0}}, @@ -1982,7 +1840,6 @@ StreamsCalculationTestCase _2sockets_mock_latency_1 = { 20, 0, 0, - 0, "LATENCY", {}, {{60, 60, 0, 0, -1, -1}, {10, 10, 0, 0, 0, 0}, {20, 20, 0, 0, 1, 0}, {10, 10, 0, 0, 2, 1}, {20, 20, 0, 0, 3, 1}}, @@ -1994,7 +1851,6 @@ StreamsCalculationTestCase _2sockets_mock_latency_2 = { 0, 0, 0, - 1, "LATENCY", {}, {{60, 60, 0, 0, -1, -1}, {20, 20, 0, 0, 1, 1}, {40, 40, 0, 0, 0, 0}}, @@ -2006,7 +1862,6 @@ StreamsCalculationTestCase _2sockets_mock_latency_3 = { 0, 0, 0, - 1, "THROUGHPUT", {}, {{60, 60, 0, 0, -1, -1}, {20, 20, 0, 0, 1, 1}, {40, 40, 0, 0, 0, 0}}, @@ -2018,7 +1873,6 @@ StreamsCalculationTestCase _2sockets_mock_latency_4 = { 10, 0, 0, - 1, "LATENCY", {}, {{60, 60, 0, 0, -1, -1}, {20, 20, 0, 0, 1, 1}, {40, 40, 0, 0, 0, 0}}, @@ -2030,7 +1884,6 @@ StreamsCalculationTestCase _2sockets_mock_latency_5 = { 50, 0, 0, - 1, "LATENCY", {}, {{60, 60, 0, 0, -1, -1}, {20, 20, 0, 0, 1, 1}, {40, 40, 0, 0, 0, 0}}, @@ -2042,7 +1895,6 @@ StreamsCalculationTestCase _2sockets_mock_latency_6 = { 0, 0, 0, - 1, "LATENCY", {}, {{60, 0, 60, 0, -1, -1}, {20, 0, 20, 0, 1, 1}, {40, 0, 40, 0, 0, 0}}, @@ -2054,7 +1906,6 @@ StreamsCalculationTestCase _2sockets_mock_latency_7 = { 0, 0, 0, - 1, "THROUGHPUT", {}, {{60, 0, 60, 0, -1, -1}, {20, 0, 20, 0, 1, 1}, {40, 0, 40, 0, 0, 0}}, @@ -2066,7 +1917,6 @@ StreamsCalculationTestCase _2sockets_mock_latency_8 = { 10, 0, 0, - 1, "LATENCY", {}, {{60, 0, 60, 0, -1, -1}, {20, 0, 20, 0, 1, 1}, {40, 0, 40, 0, 0, 0}}, @@ -2078,7 +1928,6 @@ StreamsCalculationTestCase _2sockets_mock_latency_9 = { 50, 0, 0, - 1, "LATENCY", {}, {{60, 0, 60, 0, -1, -1}, {20, 0, 20, 0, 1, 1}, {40, 0, 40, 0, 0, 0}}, @@ -2090,7 +1939,6 @@ StreamsCalculationTestCase _2sockets_mock_latency_10 = { 0, 0, 0, - 1, "LATENCY", {}, {{60, 30, 0, 30, -1, -1}, {20, 10, 0, 10, 1, 1}, {40, 20, 0, 20, 0, 0}}, @@ -2102,7 +1950,6 @@ StreamsCalculationTestCase _2sockets_mock_latency_11 = { 0, 0, 0, - 1, "THROUGHPUT", {}, {{60, 30, 0, 30, -1, -1}, {20, 10, 0, 10, 1, 1}, {40, 20, 0, 20, 0, 0}}, @@ -2114,7 +1961,6 @@ StreamsCalculationTestCase _2sockets_mock_latency_12 = { 15, 0, 0, - 1, "LATENCY", {}, {{60, 30, 0, 30, -1, -1}, {20, 10, 0, 10, 1, 1}, {40, 20, 0, 20, 0, 0}}, @@ -2126,7 +1972,6 @@ StreamsCalculationTestCase _2sockets_mock_latency_13 = { 50, 0, 0, - 1, "LATENCY", {}, {{60, 30, 0, 30, -1, -1}, {20, 10, 0, 10, 1, 1}, {40, 20, 0, 20, 0, 0}}, @@ -2142,7 +1987,6 @@ StreamsCalculationTestCase _2sockets_mock_latency_14 = { 0, 0, 0, - 3, "LATENCY", {}, {{200, 100, 0, 100, -1, -1}, @@ -2158,7 +2002,6 @@ StreamsCalculationTestCase _2sockets_mock_latency_15 = { 0, 0, 0, - 3, "THROUGHPUT", {}, {{200, 100, 0, 100, -1, -1}, @@ -2174,7 +2017,6 @@ StreamsCalculationTestCase _2sockets_mock_latency_16 = { 15, 0, 0, - 3, "LATENCY", {}, {{200, 100, 0, 100, -1, -1}, @@ -2190,7 +2032,6 @@ StreamsCalculationTestCase _2sockets_mock_latency_17 = { 50, 0, 0, - 3, "LATENCY", {}, {{200, 100, 0, 100, -1, -1}, @@ -2209,7 +2050,6 @@ StreamsCalculationTestCase _2sockets_mock_latency_18 = { 0, 0, 0, - 6, "LATENCY", {}, {{440, 220, 0, 220, -1, -1}, @@ -2229,7 +2069,6 @@ StreamsCalculationTestCase _2sockets_mock_latency_19 = { 0, 0, 0, - 6, "THROUGHPUT", {}, {{440, 220, 0, 220, -1, -1}, @@ -2249,7 +2088,6 @@ StreamsCalculationTestCase _2sockets_mock_latency_20 = { 25, 0, 0, - 6, "LATENCY", {}, {{440, 220, 0, 220, -1, -1}, @@ -2269,7 +2107,6 @@ StreamsCalculationTestCase _2sockets_mock_latency_21 = { 50, 0, 0, - 6, "LATENCY", {}, {{440, 220, 0, 220, -1, -1}, @@ -2292,7 +2129,6 @@ StreamsCalculationTestCase _2sockets_mock_latency_22 = { 0, 0, 0, - 0, "LATENCY", {ov::hint::ModelDistributionPolicy::TENSOR_PARALLEL}, {{60, 30, 0, 30, -1, -1}, {40, 20, 0, 20, 0, 0}, {20, 10, 0, 10, 1, 1}}, @@ -2310,7 +2146,6 @@ StreamsCalculationTestCase _2sockets_mock_latency_23 = { 0, 0, 0, - 0, "LATENCY", {}, {{60, 30, 0, 30, -1, -1}, {40, 20, 0, 20, 0, 0}, {20, 10, 0, 10, 1, 1}}, @@ -2322,7 +2157,6 @@ StreamsCalculationTestCase _2sockets_mock_latency_24 = { 0, 0, 0, - 0, "LATENCY", {}, {{60, 30, 0, 30, -1, -1}, {40, 20, 0, 20, 0, 0}, {20, 10, 0, 10, 1, 1}}, @@ -2334,7 +2168,6 @@ StreamsCalculationTestCase _2sockets_mock_latency_25 = { 0, 0, 0, - 0, "LATENCY", {ov::hint::ModelDistributionPolicy::TENSOR_PARALLEL}, {{200, 100, 0, 100, -1, -1}, @@ -2355,7 +2188,6 @@ StreamsCalculationTestCase _2sockets_mock_latency_26 = { 0, 0, 0, - 0, "LATENCY", {}, {{200, 100, 0, 100, -1, -1}, @@ -2375,7 +2207,6 @@ StreamsCalculationTestCase _2sockets_mock_latency_27 = { 0, 0, 0, - 0, "LATENCY", {}, {{200, 100, 0, 100, -1, -1}, @@ -2395,7 +2226,6 @@ StreamsCalculationTestCase _2sockets_mock_latency_28 = { 200, 0, 0, - 0, "LATENCY", {ov::hint::ModelDistributionPolicy::TENSOR_PARALLEL}, {{200, 100, 0, 100, -1, -1}, @@ -2416,7 +2246,6 @@ StreamsCalculationTestCase _2sockets_mock_latency_29 = { 200, 0, 0, - 0, "LATENCY", {}, {{200, 100, 0, 100, -1, -1}, @@ -2440,7 +2269,6 @@ StreamsCalculationTestCase _2sockets_mock_latency_31 = { 140, 0, 0, - 0, "LATENCY", {ov::hint::ModelDistributionPolicy::TENSOR_PARALLEL}, {{200, 100, 0, 100, -1, -1}, @@ -2461,7 +2289,6 @@ StreamsCalculationTestCase _2sockets_mock_latency_32 = { 70, 0, 0, - 0, "LATENCY", {}, {{200, 100, 0, 100, -1, -1}, @@ -2477,7 +2304,6 @@ StreamsCalculationTestCase _2sockets_mock_latency_33 = { 20, 0, 0, - 0, "LATENCY", {}, {{200, 100, 0, 100, -1, -1}, @@ -2493,7 +2319,6 @@ StreamsCalculationTestCase _2sockets_mock_latency_34 = { 0, 0, 0, - 0, "LATENCY", {ov::hint::ModelDistributionPolicy::TENSOR_PARALLEL}, {{48, 48, 0, 0, -1, -1}, {24, 24, 0, 0, 0, 0}, {24, 24, 0, 0, 1, 1}}, @@ -2505,7 +2330,6 @@ StreamsCalculationTestCase _1sockets_mock_latency_1 = { 0, 0, 14, - 0, "LATENCY", {ov::hint::ModelDistributionPolicy::TENSOR_PARALLEL}, {{14, 6, 8, 0, 0, 0}}, @@ -2517,7 +2341,6 @@ StreamsCalculationTestCase _1sockets_mock_latency_2 = { 0, 0, 6, - 0, "LATENCY", {ov::hint::ModelDistributionPolicy::TENSOR_PARALLEL}, {{14, 6, 8, 0, 0, 0}}, @@ -2529,7 +2352,6 @@ StreamsCalculationTestCase _1sockets_mock_latency_3 = { 0, 0, 14, - 0, "LATENCY", {}, {{14, 6, 8, 0, 0, 0}}, @@ -2541,7 +2363,6 @@ StreamsCalculationTestCase _1sockets_mock_latency_4 = { 0, 0, 6, - 0, "LATENCY", {}, {{14, 6, 8, 0, 0, 0}}, @@ -2553,7 +2374,6 @@ StreamsCalculationTestCase _1sockets_mock_latency_5 = { 0, 0, 14, - 0, "LATENCY", {}, {{14, 6, 8, 0, 0, 0}}, @@ -2565,7 +2385,6 @@ StreamsCalculationTestCase _1sockets_mock_latency_6 = { 0, 0, 6, - 0, "LATENCY", {}, {{14, 6, 8, 0, 0, 0}}, @@ -2577,14 +2396,13 @@ StreamsCalculationTestCase _2sockets_mock_latency_35 = { 200, 0, 0, - 3, "LATENCY", {}, {{200, 100, 0, 100, -1, -1}, + {20, 10, 0, 10, 3, 3}, {80, 40, 0, 40, 0, 0}, {60, 30, 0, 30, 1, 1}, - {40, 20, 0, 20, 2, 2}, - {20, 10, 0, 10, 3, 3}}, + {40, 20, 0, 20, 2, 2}}, {{1, ALL_PROC, 200, -1, -1}, {0, MAIN_CORE_PROC, 10, 3, 3}, {0, HYPER_THREADING_PROC, 10, 3, 3}, @@ -2601,14 +2419,13 @@ StreamsCalculationTestCase _2sockets_mock_latency_36 = { 200, 0, 0, - 3, "LATENCY", {}, {{200, 100, 0, 100, -1, -1}, + {20, 10, 0, 10, 3, 3}, {80, 40, 0, 40, 0, 0}, {60, 30, 0, 30, 1, 1}, - {40, 20, 0, 20, 2, 2}, - {20, 10, 0, 10, 3, 3}}, + {40, 20, 0, 20, 2, 2}}, {{1, ALL_PROC, 200, -1, -1}, {0, MAIN_CORE_PROC, 10, 3, 3}, {0, HYPER_THREADING_PROC, 10, 3, 3}, @@ -2625,10 +2442,9 @@ StreamsCalculationTestCase _2sockets_mock_latency_37 = { 0, 0, 0, - 1, "LATENCY", {ov::hint::ModelDistributionPolicy::TENSOR_PARALLEL}, - {{48, 48, 0, 0, -1, -1}, {24, 24, 0, 0, 0, 0}, {24, 24, 0, 0, 1, 1}}, + {{48, 48, 0, 0, -1, -1}, {24, 24, 0, 0, 1, 1}, {24, 24, 0, 0, 0, 0}}, {{1, MAIN_CORE_PROC, 48, -1, -1}, {-1, MAIN_CORE_PROC, 24, 1, 1}, {-1, MAIN_CORE_PROC, 24, 0, 0}}, }; StreamsCalculationTestCase _2sockets_mock_latency_38 = { @@ -2637,7 +2453,6 @@ StreamsCalculationTestCase _2sockets_mock_latency_38 = { 0, 0, 0, - 0, "LATENCY", {ov::hint::ModelDistributionPolicy::TENSOR_PARALLEL}, {{256, 128, 0, 128, 0, 0}, @@ -2653,7 +2468,6 @@ StreamsCalculationTestCase _2sockets_mock_latency_39 = { 0, 0, 0, - 0, "LATENCY", {}, {{104, 104, 0, 0, -1, -1}, {26, 26, 0, 0, 0, 0}, {26, 26, 0, 0, 1, 0}, {26, 26, 0, 0, 2, 1}, {26, 26, 0, 0, 3, 1}}, @@ -2665,7 +2479,6 @@ StreamsCalculationTestCase _2sockets_mock_latency_40 = { 0, 0, 0, - 0, "LATENCY", {}, {{104, 104, 0, 0, -1, -1}, {26, 26, 0, 0, 1, 0}, {26, 26, 0, 0, 2, 1}, {26, 26, 0, 0, 3, 1}, {26, 26, 0, 0, 0, 0}}, @@ -2677,7 +2490,6 @@ StreamsCalculationTestCase _2sockets_mock_latency_41 = { 0, 0, 0, - 1, "LATENCY", {}, {{104, 104, 0, 0, -1, -1}, {26, 26, 0, 0, 2, 1}, {26, 26, 0, 0, 3, 1}, {26, 26, 0, 0, 0, 0}, {26, 26, 0, 0, 1, 0}}, @@ -2689,7 +2501,6 @@ StreamsCalculationTestCase _2sockets_mock_latency_42 = { 0, 0, 0, - 1, "LATENCY", {}, {{104, 104, 0, 0, -1, -1}, {26, 26, 0, 0, 3, 1}, {26, 26, 0, 0, 0, 0}, {26, 26, 0, 0, 1, 0}, {26, 26, 0, 0, 2, 1}}, @@ -2701,7 +2512,6 @@ StreamsCalculationTestCase _2sockets_mock_latency_43 = { 0, 0, 0, - 0, "LATENCY", {}, {{208, 104, 0, 104, -1, -1}, @@ -2721,7 +2531,6 @@ StreamsCalculationTestCase _2sockets_mock_latency_44 = { 0, 0, 0, - 1, "LATENCY", {}, {{208, 104, 0, 104, -1, -1}, @@ -2741,7 +2550,6 @@ StreamsCalculationTestCase _2sockets_mock_latency_45 = { 0, 0, 0, - 0, "LATENCY", {}, {{208, 208, 0, 0, -1, -1}, {52, 52, 0, 0, 0, 0}, {52, 52, 0, 0, 1, 0}, {52, 52, 0, 0, 2, 1}, {52, 52, 0, 0, 3, 1}}, @@ -2753,7 +2561,6 @@ StreamsCalculationTestCase _2sockets_mock_latency_46 = { 0, 0, 0, - 1, "LATENCY", {}, {{208, 208, 0, 0, -1, -1}, {52, 52, 0, 0, 2, 1}, {52, 52, 0, 0, 3, 1}, {52, 52, 0, 0, 0, 0}, {52, 52, 0, 0, 1, 0}}, @@ -2765,7 +2572,6 @@ StreamsCalculationTestCase _2sockets_mock_latency_47 = { 0, 0, 0, - 0, "LATENCY", {}, {{416, 208, 0, 208, -1, -1}, @@ -2785,7 +2591,6 @@ StreamsCalculationTestCase _2sockets_mock_latency_48 = { 0, 0, 0, - 1, "LATENCY", {}, {{416, 208, 0, 208, -1, -1}, @@ -2805,7 +2610,6 @@ StreamsCalculationTestCase _2sockets_mock_latency_49 = { 80, 0, 0, - 1, "LATENCY", {}, {{416, 208, 0, 208, -1, -1}, @@ -2823,7 +2627,6 @@ StreamsCalculationTestCase _2sockets_mock_latency_50 = { 80, 0, 0, - 1, "LATENCY", {}, {{208, 208, 0, 0, -1, -1}, {52, 52, 0, 0, 2, 1}, {52, 52, 0, 0, 3, 1}, {52, 52, 0, 0, 0, 0}, {52, 52, 0, 0, 1, 0}}, @@ -2835,7 +2638,6 @@ StreamsCalculationTestCase _2sockets_mock_latency_51 = { 16, 0, 0, - 0, "LATENCY", {}, {{16, 16, 0, 0, -1, -1}, {8, 8, 0, 0, 0, 0}, {8, 8, 0, 0, 1, 1}}, diff --git a/src/plugins/intel_cpu/tests/unit/streams_info/update_proc_table_test.cpp b/src/plugins/intel_cpu/tests/unit/streams_info/update_proc_table_test.cpp new file mode 100644 index 00000000000000..08c0cf2c9089e9 --- /dev/null +++ b/src/plugins/intel_cpu/tests/unit/streams_info/update_proc_table_test.cpp @@ -0,0 +1,72 @@ +// Copyright (C) 2018-2024 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include + +#include "common_test_utils/test_common.hpp" +#include "cpu_streams_calculation.hpp" + +using namespace testing; + +namespace ov { + +namespace intel_cpu { + +struct LinuxSortProcTableTestCase { + int current_numa_node_id; + std::vector> _proc_type_table_input; + std::vector> _proc_type_table_output; +}; + +class LinuxSortProcTableTests : public ov::test::TestsCommon, + public testing::WithParamInterface> { +public: + void SetUp() override { + const auto& test_data = std::get<0>(GetParam()); + + std::vector> test_proc_type_table = test_data._proc_type_table_input; + + sort_table_by_numa_node_id(test_data.current_numa_node_id, test_proc_type_table); + + ASSERT_EQ(test_proc_type_table, test_data._proc_type_table_output); + } +}; + +LinuxSortProcTableTestCase proc_table_2sockets_24cores_hyperthreading_1 = { + 0, + {{48, 24, 0, 24, -1, -1}, {12, 6, 0, 6, 0, 0}, {12, 6, 0, 6, 1, 0}, {12, 6, 0, 6, 2, 1}, {12, 6, 0, 6, 3, 1}}, + {{48, 24, 0, 24, -1, -1}, {12, 6, 0, 6, 0, 0}, {12, 6, 0, 6, 1, 0}, {12, 6, 0, 6, 2, 1}, {12, 6, 0, 6, 3, 1}}, +}; +LinuxSortProcTableTestCase proc_table_2sockets_24cores_hyperthreading_2 = { + 1, + {{48, 24, 0, 24, -1, -1}, {12, 6, 0, 6, 0, 0}, {12, 6, 0, 6, 1, 0}, {12, 6, 0, 6, 2, 1}, {12, 6, 0, 6, 3, 1}}, + {{48, 24, 0, 24, -1, -1}, {12, 6, 0, 6, 1, 0}, {12, 6, 0, 6, 2, 1}, {12, 6, 0, 6, 3, 1}, {12, 6, 0, 6, 0, 0}}, +}; +LinuxSortProcTableTestCase proc_table_2sockets_24cores_hyperthreading_3 = { + 2, + {{48, 24, 0, 24, -1, -1}, {12, 6, 0, 6, 0, 0}, {12, 6, 0, 6, 1, 0}, {12, 6, 0, 6, 2, 1}, {12, 6, 0, 6, 3, 1}}, + {{48, 24, 0, 24, -1, -1}, {12, 6, 0, 6, 2, 1}, {12, 6, 0, 6, 3, 1}, {12, 6, 0, 6, 0, 0}, {12, 6, 0, 6, 1, 0}}, +}; +LinuxSortProcTableTestCase proc_table_2sockets_24cores_hyperthreading_4 = { + 3, + {{48, 24, 0, 24, -1, -1}, {12, 6, 0, 6, 0, 0}, {12, 6, 0, 6, 1, 0}, {12, 6, 0, 6, 2, 1}, {12, 6, 0, 6, 3, 1}}, + {{48, 24, 0, 24, -1, -1}, {12, 6, 0, 6, 3, 1}, {12, 6, 0, 6, 0, 0}, {12, 6, 0, 6, 1, 0}, {12, 6, 0, 6, 2, 1}}, +}; +LinuxSortProcTableTestCase proc_table_1sockets_mock = { + 3, + {{48, 24, 0, 24, 0, 0}}, + {{48, 24, 0, 24, 0, 0}}, +}; + +TEST_P(LinuxSortProcTableTests, UpdateProcTable) {} + +INSTANTIATE_TEST_SUITE_P(UpdateProcTableList, + LinuxSortProcTableTests, + testing::Values(proc_table_2sockets_24cores_hyperthreading_1, + proc_table_2sockets_24cores_hyperthreading_2, + proc_table_2sockets_24cores_hyperthreading_3, + proc_table_2sockets_24cores_hyperthreading_4, + proc_table_1sockets_mock)); +} // namespace intel_cpu +} // namespace ov