From d11de9861e6c32fa389f503e037098f50ffed156 Mon Sep 17 00:00:00 2001 From: Gian Marco Iodice Date: Mon, 5 Sep 2022 15:35:35 +0100 Subject: Add a macro guard in all OpenCL kernels in gemmlowp.cl Resolves COMPMID-5498 Change-Id: I474f3f963257014255d082aab0ccbe3efe5aa067 Signed-off-by: Gian Marco Iodice Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/8222 Tested-by: Arm Jenkins Comments-Addressed: Arm Jenkins Comments-Addressed: Ramy Elgammal Reviewed-by: Ramy Elgammal Reviewed-by: Gunes Bayir Benchmark: Arm Jenkins --- src/gpu/cl/kernels/ClGemmLowpMatrixMultiplyReshapedKernel.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/gpu/cl/kernels/ClGemmLowpMatrixMultiplyReshapedKernel.cpp') diff --git a/src/gpu/cl/kernels/ClGemmLowpMatrixMultiplyReshapedKernel.cpp b/src/gpu/cl/kernels/ClGemmLowpMatrixMultiplyReshapedKernel.cpp index 6446b4ce38..0325c00a5c 100644 --- a/src/gpu/cl/kernels/ClGemmLowpMatrixMultiplyReshapedKernel.cpp +++ b/src/gpu/cl/kernels/ClGemmLowpMatrixMultiplyReshapedKernel.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019-2021 Arm Limited. + * Copyright (c) 2019-2022 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -193,6 +193,9 @@ void ClGemmLowpMatrixMultiplyReshapedKernel::configure(const CLCompileContext &c kernel_name += lhs_info.transpose ? "lhs_t_" : "lhs_nt_"; kernel_name += rhs_info.transpose ? "rhs_t" : "rhs_nt"; + // A macro guard to compile ONLY the kernel of interest + build_opts.add_option("-D" + upper_string(kernel_name)); + // Create kernel _kernel = create_kernel(compile_context, kernel_name, build_opts.options()); -- cgit v1.2.1