aboutsummaryrefslogtreecommitdiff
path: root/src/core/NEON/wrapper
diff options
context:
space:
mode:
authorMichalis Spyrou <michalis.spyrou@arm.com>2021-01-06 17:40:30 +0000
committerMichalis Spyrou <michalis.spyrou@arm.com>2021-01-18 14:03:46 +0000
commitb5a450a1acc1149f99f7bb06b10694fba554f4e3 (patch)
treeac6ddf556c1656fd697a53b6ad5e961938f7d85d /src/core/NEON/wrapper
parentd2447bb039c268aa21a5ca358cc2d91abe4f4d21 (diff)
downloadComputeLibrary-b5a450a1acc1149f99f7bb06b10694fba554f4e3.tar.gz
Add SVE for Softmax
Implements COMPMID-3875 Change-Id: I38991eed3f4966db125862af066bfedff5994a25 Signed-off-by: Michalis Spyrou <michalis.spyrou@arm.com> Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/4854 Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/core/NEON/wrapper')
-rw-r--r--src/core/NEON/wrapper/traits.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/core/NEON/wrapper/traits.h b/src/core/NEON/wrapper/traits.h
index eafbeef372..0bb55afe02 100644
--- a/src/core/NEON/wrapper/traits.h
+++ b/src/core/NEON/wrapper/traits.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018-2020 Arm Limited.
+ * Copyright (c) 2018-2021 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -26,6 +26,10 @@
#include <arm_neon.h>
+#if defined(__ARM_FEATURE_SVE)
+#include <arm_sve.h>
+#endif /* defined(__ARM_FEATURE_SVE) */
+
namespace arm_compute
{
namespace wrapper
@@ -110,6 +114,16 @@ template <> struct neon_bitvector<float_t, BitWidth::W128>{ using type = float32
template <> struct neon_bitvector<float16_t, BitWidth::W64>{ using type = float16x4_t; using tag_type = vector_64_tag; };
template <> struct neon_bitvector<float16_t, BitWidth::W128>{ using type = float16x8_t; using tag_type = vector_128_tag; };
#endif // __ARM_FEATURE_FP16_VECTOR_ARITHMETIC
+
+
+#if defined(__ARM_FEATURE_SVE)
+/** Create the appropriate SVE vector given its type */
+template <typename T> struct sve_vector;
+
+template <> struct sve_vector<uint8_t>{ using scalar_type = uint8_t; using type = svuint8_t; };
+template <> struct sve_vector<int8_t>{ using scalar_type = int8_t; using type = svint8_t; };
+#endif /* defined(__ARM_FEATURE_SVE) */
+
#endif /* DOXYGEN_SKIP_THIS */
/** Helper type template to get the type of a neon vector */