From bd4a1321365b4e42b6fcd1e1b10f936be15b6696 Mon Sep 17 00:00:00 2001 From: "Shen, Wanglei" Date: Wed, 25 Dec 2024 00:32:23 +0800 Subject: [PATCH] update for cpu reservation --- src/plugins/intel_cpu/src/cpu_streams_calculation.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/plugins/intel_cpu/src/cpu_streams_calculation.cpp b/src/plugins/intel_cpu/src/cpu_streams_calculation.cpp index 06de0341be927e..9cd77b053064e2 100644 --- a/src/plugins/intel_cpu/src/cpu_streams_calculation.cpp +++ b/src/plugins/intel_cpu/src/cpu_streams_calculation.cpp @@ -210,8 +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 = - proc_type_table.size() == 1 ? proc_type_table[0][PROC_SOCKET_ID] : proc_type_table[1][PROC_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]);