diff options
author | Pablo Marquez Tello <pablo.tello@arm.com> | 2021-03-08 17:27:05 +0000 |
---|---|---|
committer | Pablo Marquez Tello <pablo.tello@arm.com> | 2021-03-17 12:45:26 +0000 |
commit | a50f19346c5b79e2743f882ce0c691c07076f207 (patch) | |
tree | 40141711eae786bc65738f04baa4e17cd6a20d97 /arm_compute/core/CPP | |
parent | d0c9cb808f674ce8bbfbdf0e66c5b8451f6af0f2 (diff) | |
download | ComputeLibrary-a50f19346c5b79e2743f882ce0c691c07076f207.tar.gz |
Updated cpu detection
* Added the case in the cpu detection code for Klein cores
* Added has_sve() and set_sve() methods in CpuInfo
* Detection code checks for presence of SVE via HWCAP_SVE
* Updated the heuristic in sve kernels to check for the absence of Klein
* Resolves: COMPMID-4085
Change-Id: I0b8c72ff19dc5a3a81628d121a1afa836e724b4f
Signed-off-by: Pablo Marquez Tello <pablo.tello@arm.com>
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/5257
Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'arm_compute/core/CPP')
-rw-r--r-- | arm_compute/core/CPP/CPPTypes.h | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/arm_compute/core/CPP/CPPTypes.h b/arm_compute/core/CPP/CPPTypes.h index fd6bfc3907..2de73acaa2 100644 --- a/arm_compute/core/CPP/CPPTypes.h +++ b/arm_compute/core/CPP/CPPTypes.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2020 Arm Limited. + * Copyright (c) 2017-2021 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -45,6 +45,7 @@ enum class CPUModel A53, A55r0, A55r1, + KLEIN, X1, A73 }; @@ -76,6 +77,10 @@ inline std::string cpu_model_to_string(CPUModel val) { return std::string("GENERIC"); } + case CPUModel::KLEIN: + { + return std::string("KLEIN"); + } case CPUModel::GENERIC_FP16: { return std::string("GENERIC_FP16"); @@ -136,6 +141,11 @@ public: * @return true of the cpu supports dot product, false otherwise */ bool has_dotprod() const; + /** Checks if the cpu model supports sve. + * + * @return true of the cpu supports sve, false otherwise + */ + bool has_sve() const; /** Gets the cpu model for a given cpuid. * * @param[in] cpuid the id of the cpu core to be retrieved, @@ -178,6 +188,11 @@ public: * @param[in] dotprod whether the cpu supports dot product. */ void set_dotprod(const bool dotprod); + /** Set sve support + * + * @param[in] sve whether the cpu supports sve. + */ + void set_sve(const bool sve); /** Set the cpumodel for a given cpu core * * @param[in] cpuid the id of the core to be set. @@ -200,6 +215,7 @@ private: std::vector<CPUModel> _percpu = {}; bool _fp16 = false; bool _dotprod = false; + bool _sve = false; unsigned int _L1_cache_size = 32768; unsigned int _L2_cache_size = 262144; }; |