From 7026b303d636e7639f8877ae8d5eff54f39c1121 Mon Sep 17 00:00:00 2001 From: Gian Marco Iodice Date: Wed, 26 Jun 2019 17:18:11 +0100 Subject: COMPMID-1979: Fuse Activation Function in CLGEMM - part 1 Implementing a new struct to contains the information for the OpenCL GEMM kernels Change-Id: I6c641c312f9c3b025a7c69dd0df3b730d2d2c2cb Signed-off-by: Gian Marco Iodice Reviewed-on: https://review.mlplatform.org/c/1434 Tested-by: Arm Jenkins Reviewed-by: Giuseppe Rossini --- tests/validation/CL/GEMMMatrixMultiplyNative.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'tests/validation/CL/GEMMMatrixMultiplyNative.cpp') diff --git a/tests/validation/CL/GEMMMatrixMultiplyNative.cpp b/tests/validation/CL/GEMMMatrixMultiplyNative.cpp index b0d1fd2ad1..031b807ef8 100644 --- a/tests/validation/CL/GEMMMatrixMultiplyNative.cpp +++ b/tests/validation/CL/GEMMMatrixMultiplyNative.cpp @@ -22,6 +22,7 @@ * SOFTWARE. */ #include "arm_compute/core/CL/kernels/CLGEMMMatrixMultiplyNativeKernel.h" +#include "arm_compute/core/KernelDescriptors.h" #include "arm_compute/core/Types.h" #include "arm_compute/core/utils/misc/ShapeCalculator.h" #include "arm_compute/runtime/CL/CLTensor.h" @@ -128,7 +129,11 @@ void validate_configuration(unsigned int m_value, unsigned int n_value, unsigned rhs_info.n0 = n0_value; rhs_info.k0 = k0_value; - GEMMReshapeInfo gemm_info(M, N, K, false, false, 0, false, broadcast_bias); + GEMMKernelInfo kernel_info; + kernel_info.m = M; + kernel_info.n = N; + kernel_info.k = K; + kernel_info.broadcast_bias = broadcast_bias; const TensorShape lhs_shape(K, M, b_value); const TensorShape rhs_shape(N, K, b_value); @@ -137,7 +142,8 @@ void validate_configuration(unsigned int m_value, unsigned int n_value, unsigned broadcast_bias? 1 : b_value); const TensorShape dst_shape = compute_mm_shape(TensorInfo(lhs_shape, 1, data_type), TensorInfo(rhs_shape, 1, data_type), - gemm_info); + kernel_info); + // Create tensors CLTensor lhs = create_tensor(lhs_shape, data_type); CLTensor rhs = create_tensor(rhs_shape, data_type); @@ -151,7 +157,7 @@ void validate_configuration(unsigned int m_value, unsigned int n_value, unsigned // Create and configure function CLGEMMMatrixMultiplyNative gemm; - gemm.configure(&lhs, &rhs, &bias, &dst, 1.0f, 1.0f, lhs_info, rhs_info, gemm_info); + gemm.configure(&lhs, &rhs, &bias, &dst, 1.0f, 1.0f, lhs_info, rhs_info, kernel_info); } } // namespace -- cgit v1.2.1