From 15f1c1d07e95f04d28dcc06ad9be17edf5e71893 Mon Sep 17 00:00:00 2001 From: sunxiaoxia2022 Date: Thu, 3 Aug 2023 14:12:39 +0800 Subject: [PATCH] modify max_threads_per_core for throughput --- .../dev/threading/cpu_streams_executor_internal.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/inference/src/dev/threading/cpu_streams_executor_internal.cpp b/src/inference/src/dev/threading/cpu_streams_executor_internal.cpp index d3fd389636e63c..c05509e225c7f5 100644 --- a/src/inference/src/dev/threading/cpu_streams_executor_internal.cpp +++ b/src/inference/src/dev/threading/cpu_streams_executor_internal.cpp @@ -36,23 +36,18 @@ void get_cur_stream_info(const int stream_id, core_type = streams_info_table[stream_info_id][PROC_TYPE]; numa_node_id = streams_info_table[stream_info_id][STREAM_NUMA_NODE_ID]; max_threads_per_core = 1; - bool have_main_core_proc = false; - bool have_hyper_threading_proc = false; if (core_type == ALL_PROC) { for (size_t i = stream_info_id + 1; i < streams_info_table.size(); i++) { if (streams_info_table[i][NUMBER_OF_STREAMS] == 0) { if (streams_info_table[i][PROC_TYPE] == HYPER_THREADING_PROC) { - have_hyper_threading_proc = true; - } else if (streams_info_table[i][PROC_TYPE] == MAIN_CORE_PROC) { - have_main_core_proc = true; + max_threads_per_core = 2; + break; } } else { break; } } - } - - if (have_main_core_proc && have_hyper_threading_proc) { + } else if (core_type == HYPER_THREADING_PROC) { max_threads_per_core = 2; }