HOT FIX: CPU binding cannot follow numactl's control (#16736)
* fix numactl command issue * fix comments
This commit is contained in:
1 parent
1c564226f3
commit
f95fd27c16
2 files changed
+5
-1
No files matched your search
@@ -12,6 +12,8 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "dev/threading/parallel_custom_arena.hpp"
|
||||
|
||||
namespace ov {
|
||||
|
||||
struct CPU {
|
||||
@@ -24,8 +26,10 @@ struct CPU {
|
||||
std::mutex _task_mutex;
|
||||
int _plugin_status = PLUGIN_USED_START;
|
||||
int _socket_idx = 0;
|
||||
int _num_threads = 0;
|
||||
|
||||
CPU() {
|
||||
_num_threads = parallel_get_max_threads();
|
||||
init_cpu(*this);
|
||||
}
|
||||
void init_cpu(CPU& cpu);
|
||||
|
||||
@@ -230,7 +230,7 @@ std::vector<std::vector<int>> get_num_available_cpu_cores() {
|
||||
}
|
||||
|
||||
bool is_cpu_map_available() {
|
||||
return cpu._cpu_mapping_table.size() > 0;
|
||||
return cpu._proc_type_table.size() > 0 && cpu._num_threads == cpu._proc_type_table[0][ALL_PROC];
|
||||
}
|
||||
|
||||
std::vector<int> reserve_available_cpus(const ColumnOfProcessorTypeTable core_type,
|
||||
|
||||
Reference in new issue
Block a user