diff options
author | SiCong Li <sicong.li@arm.com> | 2023-01-13 15:29:39 +0000 |
---|---|---|
committer | Mohmun02 <MohammedSuhail.Munshi@arm.com> | 2023-01-17 14:07:19 +0000 |
commit | 13bab71a76096985752a9e12711507021e25858d (patch) | |
tree | 3db0434b5bb1917a7a3ce9c38cb3d70b5aea0bc0 /src/gpu/cl/operators | |
parent | ba209750abc1ac7e42bab9fef5db284384d70fb3 (diff) | |
download | ComputeLibrary-13bab71a76096985752a9e12711507021e25858d.tar.gz |
Fix ClGemm crashes on unsupported data types
Resolves COMPMID-5814
Change-Id: I09b206374cf3844c09aebd3c664daec9c2335e6d
Signed-off-by: SiCong Li <sicong.li@arm.com>
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/8953
Reviewed-by: Gian Marco Iodice <gianmarco.iodice@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/gpu/cl/operators')
-rw-r--r-- | src/gpu/cl/operators/ClGemm.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gpu/cl/operators/ClGemm.cpp b/src/gpu/cl/operators/ClGemm.cpp index 4db39a635d..8db6dabe58 100644 --- a/src/gpu/cl/operators/ClGemm.cpp +++ b/src/gpu/cl/operators/ClGemm.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2022 Arm Limited. + * Copyright (c) 2017-2023 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -618,6 +618,9 @@ Status ClGemm::validate(const ITensorInfo *a, const ITensorInfo *b, const ITenso const unsigned int k = a->dimension(0); const unsigned int batch_size = reinterpret_input_as_3d ? a->dimension(3) : a->dimension(2); + // Check data type early because the auto_select_gemm_kernel has assertions on supported data types + ARM_COMPUTE_RETURN_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(a, 1, DataType::F32, DataType::F16); + // Select GEMMType CLGEMMKernelType gemm_kernel_type = auto_select_gemm_kernel(auto_heuristics::CommonQuery { |