aboutsummaryrefslogtreecommitdiff
path: root/src/core/CL/CLHelpers.cpp
diff options
context:
space:
mode:
authorMichele Di Giorgio <michele.digiorgio@arm.com>2019-11-27 16:17:30 +0000
committerMichele Di Giorgio <michele.digiorgio@arm.com>2019-12-03 11:15:36 +0000
commitf9179d393a07eb9eed753e315df79d22391906c6 (patch)
treed8a1fd9d984bdd335d3ecac117ec33c4523211ef /src/core/CL/CLHelpers.cpp
parentb714b1d6a53e6c33df2ea3c1e8340f20480d799b (diff)
downloadComputeLibrary-f9179d393a07eb9eed753e315df79d22391906c6.tar.gz
COMPMID-2793: Add support for QASYMM8_SIGNED in CLGEMMLowpMatrixMultiplyReshapedOnlyRHSKernel
Change-Id: I8abfdd3372cc394b98ec038b9fcb4abfe9216894 Signed-off-by: Michele Di Giorgio <michele.digiorgio@arm.com> Reviewed-on: https://review.mlplatform.org/c/2401 Reviewed-by: Giorgio Arena <giorgio.arena@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/core/CL/CLHelpers.cpp')
-rw-r--r--src/core/CL/CLHelpers.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/core/CL/CLHelpers.cpp b/src/core/CL/CLHelpers.cpp
index 17274d38ad..28b1a3224f 100644
--- a/src/core/CL/CLHelpers.cpp
+++ b/src/core/CL/CLHelpers.cpp
@@ -42,6 +42,7 @@ std::string get_cl_type_from_data_type(const DataType &dt)
case DataType::QASYMM8:
return "uchar";
case DataType::S8:
+ case DataType::QASYMM8_SIGNED:
case DataType::QSYMM8:
case DataType::QSYMM8_PER_CHANNEL:
return "char";
@@ -77,6 +78,7 @@ std::string get_cl_promoted_type_from_data_type(const DataType &dt)
case DataType::QASYMM8:
return "ushort";
case DataType::S8:
+ case DataType::QASYMM8_SIGNED:
case DataType::QSYMM8:
case DataType::QSYMM8_PER_CHANNEL:
return "short";
@@ -124,6 +126,7 @@ std::string get_cl_select_type_from_data_type(const DataType &dt)
case DataType::QASYMM8:
return "uchar";
case DataType::S8:
+ case DataType::QASYMM8_SIGNED:
case DataType::QSYMM8:
case DataType::QSYMM8_PER_CHANNEL:
return "char";
@@ -149,6 +152,24 @@ std::string get_cl_select_type_from_data_type(const DataType &dt)
}
}
+std::string get_cl_dot8_acc_type_from_data_type(const DataType &dt)
+{
+ switch(dt)
+ {
+ case DataType::U8:
+ case DataType::QASYMM8:
+ return "uint";
+ case DataType::S8:
+ case DataType::QASYMM8_SIGNED:
+ case DataType::QSYMM8:
+ case DataType::QSYMM8_PER_CHANNEL:
+ return "int";
+ default:
+ ARM_COMPUTE_ERROR("Unsupported data type.");
+ return "";
+ }
+}
+
std::string get_data_size_from_data_type(const DataType &dt)
{
switch(dt)
@@ -157,6 +178,7 @@ std::string get_data_size_from_data_type(const DataType &dt)
case DataType::S8:
case DataType::QSYMM8:
case DataType::QASYMM8:
+ case DataType::QASYMM8_SIGNED:
case DataType::QSYMM8_PER_CHANNEL:
return "8";
case DataType::U16:
@@ -300,6 +322,7 @@ size_t preferred_vector_width(const cl::Device &device, const DataType dt)
case DataType::U8:
case DataType::S8:
case DataType::QASYMM8:
+ case DataType::QASYMM8_SIGNED:
case DataType::QSYMM8:
case DataType::QSYMM8_PER_CHANNEL:
return device.getInfo<CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR>();