From b9626ab169a168a7c1ca57edd1996e1e80938bf1 Mon Sep 17 00:00:00 2001 From: Michalis Spyrou Date: Mon, 13 May 2019 17:41:01 +0100 Subject: COMPMID-2243 ArgMinMaxLayer: support new datatypes Change-Id: I846e833e0c94090cbbdcd6aee6061cea8295f4f9 Signed-off-by: Michalis Spyrou Reviewed-on: https://review.mlplatform.org/c/1131 Reviewed-by: Giuseppe Rossini Comments-Addressed: Arm Jenkins Tested-by: Arm Jenkins --- arm_compute/core/CL/kernels/CLReductionOperationKernel.h | 6 +++--- arm_compute/core/NEON/wrapper/intrinsics/inv.h | 10 +++++++++- arm_compute/runtime/NEON/functions/NEArgMinMaxLayer.h | 4 ++-- 3 files changed, 14 insertions(+), 6 deletions(-) (limited to 'arm_compute') diff --git a/arm_compute/core/CL/kernels/CLReductionOperationKernel.h b/arm_compute/core/CL/kernels/CLReductionOperationKernel.h index b5b90a15ce..aba11e1ad1 100644 --- a/arm_compute/core/CL/kernels/CLReductionOperationKernel.h +++ b/arm_compute/core/CL/kernels/CLReductionOperationKernel.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2018 ARM Limited. + * Copyright (c) 2017-2019 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -50,7 +50,7 @@ public: /** Set the input and output tensors. * - * @param[in] input Source tensor. Data types supported: QASYMM8/F16/F32. + * @param[in] input Source tensor. Data types supported: QASYMM8/S32/F16/F32. * @param[out] output Destination tensor. Data types and data layouts supported: Same as @p input. * Output will have the same number of dimensions as input. * @param[in] axis Axis along which to reduce. Supported reduction axis : 0,1,2,3 @@ -61,7 +61,7 @@ public: /** Static function to check if given info will lead to a valid configuration of @ref CLReductionOperationKernel. * - * @param[in] input Source tensor info. Data types supported: QASYMM8/F16/F32. + * @param[in] input Source tensor info. Data types supported: QASYMM8/S32/F16/F32. * @param[in] output Destination tensor info. Data types and data layouts supported: Same as @p input. * Output will have the same number of dimensions as input. * @param[in] axis Axis along which to reduce. Supported reduction axis : 0,1,2,3 diff --git a/arm_compute/core/NEON/wrapper/intrinsics/inv.h b/arm_compute/core/NEON/wrapper/intrinsics/inv.h index a86a9d4671..acb2c91feb 100644 --- a/arm_compute/core/NEON/wrapper/intrinsics/inv.h +++ b/arm_compute/core/NEON/wrapper/intrinsics/inv.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 ARM Limited. + * Copyright (c) 2018-2019 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -37,12 +37,20 @@ namespace wrapper return prefix##_##postfix(a); \ } +#define VINV_IMPL_INT(vtype, prefix, postfix) \ + inline vtype vinv(const vtype &a) \ + { \ + ARM_COMPUTE_ERROR("Not supported"); \ + } + VINV_IMPL(float32x2_t, vinv, f32) +VINV_IMPL_INT(int32x2_t, vinv, s32) #ifdef __ARM_FEATURE_FP16_VECTOR_ARITHMETIC VINV_IMPL(float16x4_t, vinv, f16) #endif // __ARM_FEATURE_FP16_VECTOR_ARITHMETIC VINV_IMPL(float32x4_t, vinvq, f32) +VINV_IMPL_INT(int32x4_t, vinvq, s32) #ifdef __ARM_FEATURE_FP16_VECTOR_ARITHMETIC VINV_IMPL(float16x8_t, vinvq, f16) #endif // __ARM_FEATURE_FP16_VECTOR_ARITHMETIC diff --git a/arm_compute/runtime/NEON/functions/NEArgMinMaxLayer.h b/arm_compute/runtime/NEON/functions/NEArgMinMaxLayer.h index 87d77a5e13..55b39e45ec 100644 --- a/arm_compute/runtime/NEON/functions/NEArgMinMaxLayer.h +++ b/arm_compute/runtime/NEON/functions/NEArgMinMaxLayer.h @@ -48,7 +48,7 @@ public: NEArgMinMaxLayer(std::shared_ptr memory_manager = nullptr); /** Set the input and output tensors. * - * @param[in] input Input source tensor. Data types supported: F16/F32. + * @param[in] input Input source tensor. Data types supported: QASYMM8/S32/F16/F32. * @param[in] axis Axis to find max/min index. * @param[out] output Output source tensor. Data types supported: U32. * @param[in] op Operation to perform: min or max @@ -56,7 +56,7 @@ public: void configure(ITensor *input, int axis, ITensor *output, const ReductionOperation &op); /** Static function to check if given info will lead to a valid configuration of @ref NEArgMinMaxLayer * - * @param[in] input Input source tensor info. Data types supported: F16/F32. + * @param[in] input Input source tensor info. Data types supported: QASYMM8/S32/F16/F32. * @param[in] axis Axis to find max/min index. * @param[in] output Output source tensor info. Data types supported: U32. * @param[in] op Operation to perform: min or max -- cgit v1.2.1