aboutsummaryrefslogtreecommitdiff
path: root/src/cpu/kernels/CpuSoftmaxKernel.cpp
diff options
context:
space:
mode:
authorViet-Hoa Do <viet-hoa.do@arm.com>2023-12-06 11:01:15 +0000
committerOmar Al Khatib <omar.alkhatib@arm.com>2024-04-02 09:25:23 +0000
commit77bbe2e08b0376edfd3f504950be7f4b5720eeb0 (patch)
tree153e4298e569565f5293017b19a22e3fb5718bbe /src/cpu/kernels/CpuSoftmaxKernel.cpp
parent905786ea0c1abb2b8df36c56eae93a97823cace1 (diff)
downloadComputeLibrary-77bbe2e08b0376edfd3f504950be7f4b5720eeb0.tar.gz
Add SME2 implementation of softmax for FP32
Signed-off-by: Viet-Hoa Do <viet-hoa.do@arm.com> Change-Id: I8a63610cfb9ccff89dec6045d023439fc19b027a Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/11357 Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Gunes Bayir <gunes.bayir@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Benchmark: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/cpu/kernels/CpuSoftmaxKernel.cpp')
-rw-r--r--src/cpu/kernels/CpuSoftmaxKernel.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/cpu/kernels/CpuSoftmaxKernel.cpp b/src/cpu/kernels/CpuSoftmaxKernel.cpp
index 54ff858eeb..a088fb6660 100644
--- a/src/cpu/kernels/CpuSoftmaxKernel.cpp
+++ b/src/cpu/kernels/CpuSoftmaxKernel.cpp
@@ -50,6 +50,12 @@ namespace
{
/* Softmax */
static const std::vector<typename CpuSoftmaxKernel::SoftmaxKernel> available_kernels = {
+#ifdef ARM_COMPUTE_ENABLE_SME2
+ {"sme2_fp32_softmax",
+ [](const SoftmaxKernelDataTypeISASelectorData &data)
+ { return (!data.is_log && data.dt == DataType::F32 && data.isa.sme2); },
+ REGISTER_FP32_NEON(sme2_fp32_softmax)},
+#endif // ARM_COMPUTE_ENABLE_SME2
{"neon_fp32_softmax",
[](const SoftmaxKernelDataTypeISASelectorData &data) { return (!data.is_log && data.dt == DataType::F32); },
REGISTER_FP32_NEON(neon_fp32_softmax<false>)},