aboutsummaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorGunes Bayir <gunes.bayir@arm.com>2023-12-18 13:29:31 +0000
committerGunes Bayir <gunes.bayir@arm.com>2023-12-22 15:13:39 +0000
commit85cafff0dd99b6f94a77a7d7933682fa7c6a4a70 (patch)
treebf4ed33f50e9bd99712942d17c7f9d39b2214150 /src/core
parentdda691c3b6d45de1e2dea28674ae6af6e17e9815 (diff)
downloadComputeLibrary-85cafff0dd99b6f94a77a7d7933682fa7c6a4a70.tar.gz
Add Mali™-G720 and Mali™-G620 as GpuTargets
This patch adds adds the latest Gpus as Gpu Target and sets up kernel selection heuristics for MatMul to address some nightly issues. Resolves: COMPMID-6766 Change-Id: I29dbb08c5ecfb3fcd63230b0b1675ab557074aca Signed-off-by: Gunes Bayir <gunes.bayir@arm.com> Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/10902 Tested-by: Arm Jenkins <bsgcomp@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Jakub Sujak <jakub.sujak@arm.com> Benchmark: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/core')
-rw-r--r--src/core/GPUTarget.cpp50
1 files changed, 37 insertions, 13 deletions
diff --git a/src/core/GPUTarget.cpp b/src/core/GPUTarget.cpp
index 2d1a13cb33..5904e1a06f 100644
--- a/src/core/GPUTarget.cpp
+++ b/src/core/GPUTarget.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018-2022 Arm Limited.
+ * Copyright (c) 2018-2023 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -30,6 +30,23 @@
namespace
{
+
+arm_compute::GPUTarget get_fifth_gen_target(const std::string &version)
+{
+ if (version.find("G720") != std::string::npos)
+ {
+ return arm_compute::GPUTarget::G720;
+ }
+ else if (version.find("G620") != std::string::npos)
+ {
+ return arm_compute::GPUTarget::G620;
+ }
+ else
+ {
+ return arm_compute::GPUTarget::UNKNOWN;
+ }
+}
+
arm_compute::GPUTarget get_valhall_target(const std::string &version)
{
if (version.find("G77") != std::string::npos)
@@ -152,16 +169,18 @@ namespace arm_compute
const std::string &string_from_target(GPUTarget target)
{
static std::map<GPUTarget, const std::string> gpu_target_map = {
- {GPUTarget::MIDGARD, "midgard"}, {GPUTarget::BIFROST, "bifrost"}, {GPUTarget::VALHALL, "valhall"},
- {GPUTarget::T600, "t600"}, {GPUTarget::T700, "t700"}, {GPUTarget::T800, "t800"},
- {GPUTarget::G71, "g71"}, {GPUTarget::G72, "g72"}, {GPUTarget::G51, "g51"},
- {GPUTarget::G51BIG, "g51big"}, {GPUTarget::G51LIT, "g51lit"}, {GPUTarget::G31, "g31"},
- {GPUTarget::G76, "g76"}, {GPUTarget::G52, "g52"}, {GPUTarget::G52LIT, "g52lit"},
- {GPUTarget::G77, "g77"}, {GPUTarget::G57, "g57"}, {GPUTarget::G78, "g78"},
- {GPUTarget::G68, "g68"}, {GPUTarget::G78AE, "g78ae"}, {GPUTarget::G710, "g710"},
- {GPUTarget::G610, "g610"}, {GPUTarget::G510, "g510"}, {GPUTarget::G310, "g310"},
- {GPUTarget::G715, "g715"}, {GPUTarget::G615, "g615"},
- };
+ {GPUTarget::MIDGARD, "midgard"}, {GPUTarget::BIFROST, "bifrost"}, {GPUTarget::VALHALL, "valhall"},
+ {GPUTarget::FIFTHGEN, "fifthgen"},
+
+ {GPUTarget::T600, "t600"}, {GPUTarget::T700, "t700"}, {GPUTarget::T800, "t800"},
+ {GPUTarget::G71, "g71"}, {GPUTarget::G72, "g72"}, {GPUTarget::G51, "g51"},
+ {GPUTarget::G51BIG, "g51big"}, {GPUTarget::G51LIT, "g51lit"}, {GPUTarget::G31, "g31"},
+ {GPUTarget::G76, "g76"}, {GPUTarget::G52, "g52"}, {GPUTarget::G52LIT, "g52lit"},
+ {GPUTarget::G77, "g77"}, {GPUTarget::G57, "g57"}, {GPUTarget::G78, "g78"},
+ {GPUTarget::G68, "g68"}, {GPUTarget::G78AE, "g78ae"}, {GPUTarget::G710, "g710"},
+ {GPUTarget::G610, "g610"}, {GPUTarget::G510, "g510"}, {GPUTarget::G310, "g310"},
+ {GPUTarget::G715, "g715"}, {GPUTarget::G615, "g615"}, {GPUTarget::G720, "g720"},
+ {GPUTarget::G620, "g620"}};
return gpu_target_map[target];
}
@@ -188,8 +207,13 @@ GPUTarget get_target_from_name(const std::string &device_name)
GPUTarget gpu_target;
if (target == 'G' || is_future_gpu)
{
- // Check for Valhall or Bifrost
- gpu_target = get_valhall_target(version);
+ // Check for Valhall, Bifrost or 5-th Gen
+ gpu_target = get_fifth_gen_target(version);
+ if (gpu_target == GPUTarget::UNKNOWN)
+ {
+ gpu_target = get_valhall_target(version);
+ }
+
if (gpu_target == GPUTarget::UNKNOWN)
{
gpu_target = get_bifrost_target(version);