Skip to content

Commit

Permalink
heuristic update
Browse files Browse the repository at this point in the history
  • Loading branch information
liubo-intel committed Jul 9, 2024
1 parent a85a016 commit 9caf248
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/plugins/intel_cpu/src/cpu_streams_calculation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -582,11 +582,17 @@ int get_model_prefer_threads(const int num_streams,
: proc_type_table[0][MAIN_CORE_PROC])
: proc_type_table[0][MAIN_CORE_PROC] + proc_type_table[0][EFFICIENT_CORE_PROC];
#endif
} else if (isNewXeon && !llm_related && proc_type_table.size() > 1 && proc_type_table[1][MAIN_CORE_PROC] >= 32) {
} else if (isNewXeon && !llm_related && proc_type_table.size() > 1) {
// // my test
// model_prefer = 32;
// TODO: config.weightSize threshold need tobe updated
model_prefer = (config.weightSize <= 100) ? 32 : proc_type_table[1][MAIN_CORE_PROC];
if (config.weightSize <= 100) {
model_prefer = (proc_type_table[1][MAIN_CORE_PROC] > 32) ? 32 : proc_type_table[1][MAIN_CORE_PROC];
} else if ((proc_type_table.size() > 3) &&
(proc_type_table[1][PROC_SOCKET_ID] == proc_type_table[2][PROC_SOCKET_ID]) &&
(proc_type_table[1][MAIN_CORE_PROC] + proc_type_table[2][MAIN_CORE_PROC] >= 64)) {
model_prefer = proc_type_table[1][MAIN_CORE_PROC] + proc_type_table[2][MAIN_CORE_PROC];
}
}
} else { // throughput
model_prefer = config.modelPreferThreads;
Expand Down

0 comments on commit 9caf248

Please sign in to comment.