From 7b4278627ef04fb1fb136fe2a367bb67c97218d1 Mon Sep 17 00:00:00 2001 From: Manuel Bottini Date: Mon, 8 Feb 2021 13:45:19 +0000 Subject: Fix Floating Point Exception for cl_gemm_reshaped Return proper error in the examples when such cases occur Resolves: COMPMID-4237 Change-Id: I864c6f73a629a961774c7ae1cb62c28edcbed379 Signed-off-by: Manuel Bottini Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/5028 Reviewed-by: Giorgio Arena Reviewed-by: Georgios Pinitas Comments-Addressed: Arm Jenkins Tested-by: Arm Jenkins --- examples/gemm_tuner/cl_gemm_reshaped.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'examples/gemm_tuner/cl_gemm_reshaped.cpp') diff --git a/examples/gemm_tuner/cl_gemm_reshaped.cpp b/examples/gemm_tuner/cl_gemm_reshaped.cpp index e518b86b4e..2ea4769dd3 100644 --- a/examples/gemm_tuner/cl_gemm_reshaped.cpp +++ b/examples/gemm_tuner/cl_gemm_reshaped.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019-2020 Arm Limited. + * Copyright (c) 2019-2021 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -260,7 +260,11 @@ public: if(rhs_info.export_to_cl_image) { - examples::gemm_tuner_helpers::update_padding_for_cl_image(rhs_reshaped.info()); + if(!examples::gemm_tuner_helpers::update_padding_for_cl_image(rhs_reshaped.info())) + { + std::cerr << "cl_image is not supported on the device, disable export_to_cl_image" << std::endl; + return false; + } } // Validate argments -- cgit v1.2.1