aboutsummaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorOmar Al Khatib <omar.alkhatib@arm.com>2024-05-09 16:06:23 +0100
committerMichael Kozlov <michael.kozlov@arm.com>2024-05-17 15:26:57 +0100
commit44dbe61323243994ba6523c566781161c402f75f (patch)
tree1ea7d2d411669d638c4b0abbb9dacbf23b040d55 /src/core
parent1b62b80f8a6f30f4f79810d9951655295df6f771 (diff)
downloadComputeLibrary-44dbe61323243994ba6523c566781161c402f75f.tar.gz
Update logic in the OpenMP scheduler to exclude LITTLE cores
On systems with BIG/MID/LITTLE cores, we need to exclude the LITTLE cores. This is make changes to CPUInfo to detect number of LITTLE cores and set the num_threads to TOTAL_CORES-NUM_LITTLE cores Resolves [COMPMID-7014] Signed-off-by: Omar Al Khatib <omar.alkhatib@arm.com> Change-Id: I3e1772e5b64d1c45304860be43233b7e5dd8dba1 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/11565 Reviewed-by: Pablo Marquez Tello <pablo.tello@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Benchmark: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/core')
-rw-r--r--src/core/CPP/CPPTypes.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/core/CPP/CPPTypes.cpp b/src/core/CPP/CPPTypes.cpp
index f6761f27b0..ef0518ed3d 100644
--- a/src/core/CPP/CPPTypes.cpp
+++ b/src/core/CPP/CPPTypes.cpp
@@ -145,5 +145,20 @@ unsigned long CPUInfo::get_sme2_vector_length() const
return 0;
#endif // ARM_COMPUTE_ENABLE_SME2
}
-
+bool CPUInfo::cpu_has_little_mid_big() const
+{
+#if defined(__ANDROID__)
+ return _impl->info.has_little_mid_big();
+#else /* defined(__ANDROID__) */
+ return false;
+#endif /* defined(__ANDROID__) */
+}
+unsigned int CPUInfo::get_cpu_num_excluding_little() const
+{
+#if defined(__ANDROID__)
+ return _impl->info.not_little_num_cpus();
+#else /* defined(__ANDROID__) */
+ return get_cpu_num();
+#endif /* defined(__ANDROID__) */
+}
} // namespace arm_compute