aboutsummaryrefslogtreecommitdiff
path: root/src/gpu/cl/ClKernelLibrary.cpp
diff options
context:
space:
mode:
authorRamy Elgammal <ramy.elgammal@arm.com>2023-03-09 21:15:37 +0000
committerGunes Bayir <gunes.bayir@arm.com>2023-03-17 11:00:57 +0000
commit2b6ebfe4270b06b09e45f306e8384950aeca7e4e (patch)
tree44a65551aa32352a57090bf550b96cbf5b54222f /src/gpu/cl/ClKernelLibrary.cpp
parent40aab11ff88ed432d5028478e531f8d0fc404d4c (diff)
downloadComputeLibrary-2b6ebfe4270b06b09e45f306e8384950aeca7e4e.tar.gz
Implement OpenCL MatMul for Lhs NT Rhs T/NT FP32/16
- Implement ClNativeMatMulKernel class - Implement opencl kernel for LHS non-transposed and RHS non-transposed - Implement opencl kernel for LHS non-transposed and RHS transposed - Add test fixture and dataset for matmul - Implement transpose_tensor() for reference implementation to transpose high dimensional tensors Resolves: COMPMID-5944, COMPMID-5951 Co-authored-by: Gunes Bayir <gunes.bayir@arm.com> Co-authored-by: Ramy Elgammal <ramy.elgammal@arm.com> Change-Id: I1d5b8978f41be27baddb3153ade880472141573f Signed-off-by: Gunes Bayir <gunes.bayir@arm.com> Signed-off-by: Ramy Elgammal <ramy.elgammal@arm.com> Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/9333 Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Gian Marco Iodice <gianmarco.iodice@arm.com> Benchmark: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/gpu/cl/ClKernelLibrary.cpp')
-rw-r--r--src/gpu/cl/ClKernelLibrary.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gpu/cl/ClKernelLibrary.cpp b/src/gpu/cl/ClKernelLibrary.cpp
index f788bedc34..482e8c341d 100644
--- a/src/gpu/cl/ClKernelLibrary.cpp
+++ b/src/gpu/cl/ClKernelLibrary.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016-2022 Arm Limited.
+ * Copyright (c) 2016-2023 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -358,6 +358,8 @@ const std::map<std::string, std::string> ClKernelLibrary::_kernel_program_map =
{ "strided_slice", "common/slice_ops.cl" },
{ "tile", "common/tile.cl" },
{ "transpose", "common/transpose.cl" },
+ { "mat_mul_native_nt_nt", "common/mat_mul.cl" },
+ { "mat_mul_native_nt_t", "common/mat_mul.cl" },
#ifdef ENABLE_NCHW_KERNELS
{ "batch_to_space_nchw", "nchw/batch_to_space.cl" },
{ "batch_to_space_static_nchw", "nchw/batch_to_space.cl" },
@@ -781,6 +783,10 @@ const std::map<std::string, std::string> ClKernelLibrary::_program_source_map =
"common/unpooling_layer.cl",
#include "./cl_kernels/common/unpooling_layer.clembed"
},
+ {
+ "common/mat_mul.cl",
+#include "./cl_kernels/common/mat_mul.clembed"
+ },
#ifdef ENABLE_NCHW_KERNELS
{
"nchw/batch_to_space.cl",