From c6eaec3610fa27651582f6c1acad35afffe360f6 Mon Sep 17 00:00:00 2001 From: Gian Marco Iodice Date: Mon, 20 Jul 2020 13:31:05 +0100 Subject: COMPMID-3326; Update heuristic for GEMMReshaped and GEMMReshapedOnlyRHS - Update the heuristic for Arm Mali-G77 (F32) in order to use the OpenCL image2d object on GEMM Change-Id: Ife6736a22ec2a114368bb338908f0c5f239dfad6 Signed-off-by: Gian Marco Iodice Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/3593 Tested-by: Arm Jenkins Comments-Addressed: Arm Jenkins Reviewed-by: Michele Di Giorgio --- src/runtime/CL/functions/CLGEMM.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/runtime/CL/functions/CLGEMM.cpp') diff --git a/src/runtime/CL/functions/CLGEMM.cpp b/src/runtime/CL/functions/CLGEMM.cpp index 43eb736d40..4a74630036 100644 --- a/src/runtime/CL/functions/CLGEMM.cpp +++ b/src/runtime/CL/functions/CLGEMM.cpp @@ -291,8 +291,16 @@ void CLGEMM::configure_reshaped_only_rhs(const CLCompileContext &compile_context std::unique_ptr gemm_config = CLGEMMReshapedOnlyRHSKernelConfigurationFactory::create(gpu_target); ARM_COMPUTE_ERROR_ON_NULLPTR(gemm_config.get()); + unsigned int m_internal = m; + unsigned int b_internal = batch_size; + if(reinterpret_input_as_3d) + { + m_internal = a->info()->dimension(1); + b_internal = a->info()->dimension(2); + } + // Configure lhs_info and rhs_info - std::tie(lhs_info, rhs_info) = gemm_config->configure(m, n, k, batch_size, data_type); + std::tie(lhs_info, rhs_info) = gemm_config->configure(m_internal, n, k, b_internal, data_type); ICLTensor *reshaped_rhs = &_tmp_b; if(_weights_manager && _weights_manager->are_weights_managed(b)) -- cgit v1.2.1