From 5e18b1d24544f7f5b7fb4cfebbe60ccdf35add04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=AF=85?= Date: Fri, 20 Jul 2018 16:19:59 +0800 Subject: [PATCH] Fix openmp get core count bug --- mace/core/runtime/cpu/cpu_runtime.cc | 6 ------ 1 file changed, 6 deletions(-) diff --git a/mace/core/runtime/cpu/cpu_runtime.cc b/mace/core/runtime/cpu/cpu_runtime.cc index a3fe5959..5bef3805 100644 --- a/mace/core/runtime/cpu/cpu_runtime.cc +++ b/mace/core/runtime/cpu/cpu_runtime.cc @@ -36,7 +36,6 @@ namespace mace { namespace { -#ifndef MACE_ENABLE_OPENMP int GetCPUCount() { char path[32]; int cpu_count = 0; @@ -54,7 +53,6 @@ int GetCPUCount() { cpu_count++; } } -#endif int GetCPUMaxFreq(int cpu_id) { char path[64]; @@ -98,11 +96,7 @@ MaceStatus GetCPUBigLittleCoreIDs(std::vector *big_core_ids, std::vector *little_core_ids) { MACE_CHECK_NOTNULL(big_core_ids); MACE_CHECK_NOTNULL(little_core_ids); -#ifdef MACE_ENABLE_OPENMP - int cpu_count = omp_get_num_procs(); -#else int cpu_count = GetCPUCount(); -#endif std::vector cpu_max_freq(cpu_count); // set cpu max frequency -- GitLab