update default affinity for macOS (#17080)
This commit is contained in:
@@ -28,24 +28,28 @@ using namespace dnnl::impl::cpu::x64;
|
||||
|
||||
Config::Config() {
|
||||
// this is default mode
|
||||
#if defined(__APPLE__) || defined(_WIN32)
|
||||
streamExecutorConfig._threadBindingType = InferenceEngine::IStreamsExecutor::NONE;
|
||||
#else
|
||||
streamExecutorConfig._threadBindingType = InferenceEngine::IStreamsExecutor::CORES;
|
||||
#endif
|
||||
|
||||
// for the TBB code-path, additional configuration depending on the OS and CPU types
|
||||
#if (IE_THREAD == IE_THREAD_TBB || IE_THREAD == IE_THREAD_TBB_AUTO)
|
||||
#if defined(__APPLE__) || defined(_WIN32)
|
||||
// 'CORES' is not implemented for Win/MacOS; so the 'NONE' or 'NUMA' is default
|
||||
auto numaNodes = getAvailableNUMANodes();
|
||||
if (numaNodes.size() > 1) {
|
||||
streamExecutorConfig._threadBindingType = InferenceEngine::IStreamsExecutor::NUMA;
|
||||
} else {
|
||||
streamExecutorConfig._threadBindingType = InferenceEngine::IStreamsExecutor::NONE;
|
||||
}
|
||||
#endif
|
||||
// for the TBB code-path, additional configuration depending on the OS and CPU types
|
||||
#if (IE_THREAD == IE_THREAD_TBB || IE_THREAD == IE_THREAD_TBB_AUTO)
|
||||
# if defined(__APPLE__) || defined(_WIN32)
|
||||
// 'CORES' is not implemented for Win/MacOS; so the 'NONE' or 'NUMA' is default
|
||||
auto numaNodes = getAvailableNUMANodes();
|
||||
if (numaNodes.size() > 1) {
|
||||
streamExecutorConfig._threadBindingType = InferenceEngine::IStreamsExecutor::NUMA;
|
||||
} else {
|
||||
streamExecutorConfig._threadBindingType = InferenceEngine::IStreamsExecutor::NONE;
|
||||
}
|
||||
# endif
|
||||
|
||||
if (getAvailableCoresTypes().size() > 1 /*Hybrid CPU*/) {
|
||||
streamExecutorConfig._threadBindingType = InferenceEngine::IStreamsExecutor::HYBRID_AWARE;
|
||||
}
|
||||
#endif
|
||||
if (getAvailableCoresTypes().size() > 1 /*Hybrid CPU*/) {
|
||||
streamExecutorConfig._threadBindingType = InferenceEngine::IStreamsExecutor::HYBRID_AWARE;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!mayiuse(avx512_core_bf16))
|
||||
enforceBF16 = false;
|
||||
|
||||
Reference in New Issue
Block a user