diff --git a/src/inference/src/dev/threading/cpu_streams_executor.cpp b/src/inference/src/dev/threading/cpu_streams_executor.cpp index 0b22e913628..2a45314f0ed 100644 --- a/src/inference/src/dev/threading/cpu_streams_executor.cpp +++ b/src/inference/src/dev/threading/cpu_streams_executor.cpp @@ -133,9 +133,7 @@ struct CPUStreamsExecutor::Impl { const int concurrency, const int core_type, const int numa_node_id) { - _numaNodeId = (_impl->_usedNumaNodes.size() == 1 && _impl->_usedNumaNodes.at(0) == -1) - ? -1 // macOS - : std::max(0, numa_node_id); + _numaNodeId = std::max(0, numa_node_id); _socketId = get_socket_by_numa_node(_numaNodeId); if (stream_type == STREAM_WITHOUT_PARAM) { _taskArena.reset(new custom::task_arena{concurrency}); diff --git a/src/inference/src/system_conf.cpp b/src/inference/src/system_conf.cpp index 16fe74bf754..fcd018aa467 100644 --- a/src/inference/src/system_conf.cpp +++ b/src/inference/src/system_conf.cpp @@ -247,7 +247,7 @@ int get_num_numa_nodes() { return cpu_info()._numa_nodes; } int get_num_sockets() { - return -1; + return cpu_info()._sockets; } void reserve_available_cpus(const std::vector> streams_info_table, std::vector>& stream_processors, @@ -255,6 +255,12 @@ void reserve_available_cpus(const std::vector> streams_info_tab void set_cpu_used(const std::vector& cpu_ids, const int used) {} int get_socket_by_numa_node(int numa_node_id) { + CPU& cpu = cpu_info(); + for (size_t i = 0; i < cpu._proc_type_table.size(); i++) { + if (cpu._proc_type_table[i][PROC_NUMA_NODE_ID] == numa_node_id) { + return cpu._proc_type_table[i][PROC_SOCKET_ID]; + } + } return -1; }; diff --git a/src/plugins/intel_cpu/src/exec_network.cpp b/src/plugins/intel_cpu/src/exec_network.cpp index 21ac20a2942..b779891df09 100644 --- a/src/plugins/intel_cpu/src/exec_network.cpp +++ b/src/plugins/intel_cpu/src/exec_network.cpp @@ -176,9 +176,7 @@ ExecNetwork::GraphGuard::Lock ExecNetwork::GetGraph() const { { std::lock_guard lock{*_mutex.get()}; // disable weights caching if graph was created only once - // "socketId != -1" is the WA for MacOS, will remove later - auto weightsCache = - (_cfg.streamExecutorConfig._streams != 1 && socketId != -1) ? _socketWeights[socketId] : nullptr; + auto weightsCache = _cfg.streamExecutorConfig._streams != 1 ? _socketWeights[socketId] : nullptr; auto isQuantizedFlag = (_cfg.lpTransformsMode == Config::On) &&