aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorViet-Hoa Do <viet-hoa.do@arm.com>2023-02-24 17:32:27 +0000
committerViet-Hoa Do <viet-hoa.do@arm.com>2023-02-27 15:13:41 +0000
commit13321f7607410cc0150ac15407eea9378dcbdfc8 (patch)
treeb587d4605a6f6e35ff957ea528ad03b70f44e349
parent4537089a5cd17e49f5bb8d5e7f8374e451872387 (diff)
downloadComputeLibrary-13321f7607410cc0150ac15407eea9378dcbdfc8.tar.gz
Add build option to disable threads hint
Signed-off-by: Viet-Hoa Do <viet-hoa.do@arm.com> Resolves: COMPMID-5936 Change-Id: Iedfcc632f5d900865f38bd7b164121af48546542 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/9220 Benchmark: Arm Jenkins <bsgcomp@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Pablo Marquez Tello <pablo.tello@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
-rw-r--r--src/common/cpuinfo/CpuInfo.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/cpuinfo/CpuInfo.cpp b/src/common/cpuinfo/CpuInfo.cpp
index 1dd8ab5441..cdcdea916c 100644
--- a/src/common/cpuinfo/CpuInfo.cpp
+++ b/src/common/cpuinfo/CpuInfo.cpp
@@ -393,7 +393,7 @@ uint32_t num_threads_hint()
{
unsigned int num_threads_hint = 1;
-#if !defined(BARE_METAL) && !defined(_WIN64)
+#if !defined(BARE_METAL) && !defined(_WIN64) && !defined(ARM_COMPUTE_DISABLE_THREADS_HINT)
std::vector<std::string> cpus;
cpus.reserve(64);
@@ -440,7 +440,7 @@ uint32_t num_threads_hint()
// Set thread hint
num_threads_hint = cpus.empty() ? std::thread::hardware_concurrency() : least_frequent_cpu_occurences(cpus);
-#endif /* !defined(BARE_METAL) */
+#endif /* !defined(BARE_METAL) && !defined(_WIN64) && !defined(ARM_COMPUTE_DISABLE_THREADS_HINT) */
return num_threads_hint;
}