From 0c17aa25a4f7bc812707150b91930f0cf8e75294 Mon Sep 17 00:00:00 2001 From: Gian Marco Iodice Date: Fri, 27 Sep 2019 09:23:15 +0100 Subject: COMPMID-2571: Add mixed-precision support in CLGEMMReshaped for FP16 Change-Id: I5ba90d4de4594ed784c7230aa6b10503be67c001 Signed-off-by: Gian Marco Iodice Reviewed-on: https://review.mlplatform.org/c/1991 Tested-by: Arm Jenkins Reviewed-by: Georgios Pinitas Comments-Addressed: Arm Jenkins --- .../CLGEMMReshapedKernelConfigurationBifrost.cpp | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'src/core/CL/gemm/reshaped/CLGEMMReshapedKernelConfigurationBifrost.cpp') diff --git a/src/core/CL/gemm/reshaped/CLGEMMReshapedKernelConfigurationBifrost.cpp b/src/core/CL/gemm/reshaped/CLGEMMReshapedKernelConfigurationBifrost.cpp index 0c2942a184..0ffbe78449 100644 --- a/src/core/CL/gemm/reshaped/CLGEMMReshapedKernelConfigurationBifrost.cpp +++ b/src/core/CL/gemm/reshaped/CLGEMMReshapedKernelConfigurationBifrost.cpp @@ -42,8 +42,6 @@ CLGEMMReshapedKernelConfigurationBifrost::CLGEMMReshapedKernelConfigurationBifro std::pair CLGEMMReshapedKernelConfigurationBifrost::configure(unsigned int m, unsigned int n, unsigned int k, unsigned int b, DataType data_type) { - ARM_COMPUTE_ERROR_ON(data_type != DataType::F32 && data_type != DataType::F16 && data_type != DataType::QASYMM8); - using ConfigurationFunctionExecutorPtr = std::pair (CLGEMMReshapedKernelConfigurationBifrost::*)(unsigned int m, unsigned int n, unsigned int k, unsigned int b); // Configurations for Mali-G76 @@ -65,9 +63,23 @@ std::pair CLGEMMReshapedKernelConfiguratio switch(_target) { case GPUTarget::G76: - return (this->*gemm_configs_G76[data_type])(m, n, k, b); + if (gemm_configs_G76.find(data_type) != gemm_configs_G76.end()) + { + return (this->*gemm_configs_G76[data_type])(m, n, k, b); + } + else + { + ARM_COMPUTE_ERROR("Not supported data type"); + } default: - return (this->*gemm_configs_G7x[data_type])(m, n, k, b); + if (gemm_configs_G7x.find(data_type) != gemm_configs_G7x.end()) + { + return (this->*gemm_configs_G7x[data_type])(m, n, k, b); + } + else + { + ARM_COMPUTE_ERROR("Not supported data type"); + } } } -- cgit v1.2.1