From 67c3c631240a67105d9e30c6fd9dc413d075f095 Mon Sep 17 00:00:00 2001 From: Pablo Marquez Tello Date: Mon, 23 Jan 2023 17:00:41 +0000 Subject: Fix num_threads_hint() on macos. * Query the number of big cores rather than the total number of cores on the system * Resolves MLCE-994 Change-Id: I88cb6a4fd2ece9a035edd4cc5c0f5cf4aef93468 Signed-off-by: Pablo Marquez Tello Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/9006 Tested-by: Arm Jenkins Reviewed-by: Gunes Bayir Reviewed-by: Jakub Sujak Comments-Addressed: Arm Jenkins Benchmark: Arm Jenkins --- src/common/cpuinfo/CpuInfo.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/cpuinfo/CpuInfo.cpp b/src/common/cpuinfo/CpuInfo.cpp index f76c0cc366..1dd8ab5441 100644 --- a/src/common/cpuinfo/CpuInfo.cpp +++ b/src/common/cpuinfo/CpuInfo.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Arm Limited. + * Copyright (c) 2021-2023 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -352,7 +352,7 @@ CpuInfo CpuInfo::build() CpuInfo info(isa, cpus_model); return info; #elif defined(__aarch64__) && defined(__APPLE__) /* #elif(BARE_METAL) && defined(__aarch64__) */ - int ncpus = get_hw_capability("hw.logicalcpu"); + int ncpus = get_hw_capability("hw.perflevel0.logicalcpu"); CpuIsaInfo isainfo; std::vector cpus_model(ncpus); isainfo.neon = get_hw_capability("hw.optional.neon"); -- cgit v1.2.1