aboutsummaryrefslogtreecommitdiff
path: root/src/gpu/cl/ClKernelLibrary.cpp
diff options
context:
space:
mode:
authorViet-Hoa Do <viet-hoa.do@arm.com>2023-10-13 17:40:32 +0100
committerViet-Hoa Do <viet-hoa.do@arm.com>2023-10-31 10:16:25 +0000
commit29254aeb11a76c86449c2f38587e9144b2f2aacb (patch)
treeca2df26e81c2417b34768ac325e0f7200b5265df /src/gpu/cl/ClKernelLibrary.cpp
parente5362e7e5dbccf81c5296a7e77154e11e1a14d2f (diff)
downloadComputeLibrary-29254aeb11a76c86449c2f38587e9144b2f2aacb.tar.gz
Optimize CL softmax
* The new softmax implementation consists of only a single kernel. - There are 2 versions of softmax, one for the x dimension and one for any other dimensions. - Softmax kernel handles both native and quantized data type. Resolves: COMPMID-6447 Signed-off-by: Viet-Hoa Do <viet-hoa.do@arm.com> Change-Id: I4a9ae5bc63f78aebeaa85ee48a0d102c9c245eda Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/10489 Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: SiCong Li <sicong.li@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Benchmark: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/gpu/cl/ClKernelLibrary.cpp')
-rw-r--r--src/gpu/cl/ClKernelLibrary.cpp12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/gpu/cl/ClKernelLibrary.cpp b/src/gpu/cl/ClKernelLibrary.cpp
index bcade94522..4544a66e39 100644
--- a/src/gpu/cl/ClKernelLibrary.cpp
+++ b/src/gpu/cl/ClKernelLibrary.cpp
@@ -346,12 +346,8 @@ const std::map<std::string, std::string> ClKernelLibrary::_kernel_program_map =
{"select_same_rank", "common/select.cl"},
{"select_different_rank_2", "common/select.cl"},
{"select_different_rank_n", "common/select.cl"},
- {"softmax_layer_norm", "common/softmax_layer.cl"},
- {"softmax_layer_norm_quantized", "common/softmax_layer_quantized.cl"},
- {"softmax_layer_max_shift_exp_sum_quantized_serial", "common/softmax_layer_quantized.cl"},
- {"softmax_layer_max_shift_exp_sum_quantized_parallel", "common/softmax_layer_quantized.cl"},
- {"softmax_layer_max_shift_exp_sum_serial", "common/softmax_layer.cl"},
- {"softmax_layer_max_shift_exp_sum_parallel", "common/softmax_layer.cl"},
+ {"softmax_x", "common/softmax_layer.cl"},
+ {"softmax_non_x", "common/softmax_layer.cl"},
{"stack_layer", "common/stack_layer.cl"},
{"strided_slice", "common/slice_ops.cl"},
{"tile", "common/tile.cl"},
@@ -735,10 +731,6 @@ const std::map<std::string, std::string> ClKernelLibrary::_program_source_map =
#include "./cl_kernels/common/softmax_layer.clembed"
},
{
- "common/softmax_layer_quantized.cl",
-#include "./cl_kernels/common/softmax_layer_quantized.clembed"
- },
- {
"common/slice_ops.cl",
#include "./cl_kernels/common/slice_ops.clembed"
},