From 301e33f8f94be6427bf2377570388c379d8c8466 Mon Sep 17 00:00:00 2001 From: Gunes Bayir Date: Mon, 29 Apr 2024 17:00:14 +0100 Subject: Add fp16 and integer data type support for ScatterNd in Gpu Resolves: COMPMID-6899 Change-Id: I3743f2c9e5c21e1ec9f4c81d08c148666afad33a Signed-off-by: Gunes Bayir Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/11505 Benchmark: Arm Jenkins Tested-by: Arm Jenkins Reviewed-by: Jakub Sujak Reviewed-by: Sang Won Ha Comments-Addressed: Arm Jenkins --- src/core/CL/cl_kernels/common/scatter.cl | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/core/CL') diff --git a/src/core/CL/cl_kernels/common/scatter.cl b/src/core/CL/cl_kernels/common/scatter.cl index ac9f828df2..e3ec9cc98e 100644 --- a/src/core/CL/cl_kernels/common/scatter.cl +++ b/src/core/CL/cl_kernels/common/scatter.cl @@ -28,8 +28,15 @@ // Where a corresponds to the existing value, and b the new value. #define ADD_OP(a, b) ((a) + (b)) #define SUB_OP(a, b) ((a) - (b)) + +#ifdef IS_FLOAT #define MAX_OP(a, b) fmax(a, b) #define MIN_OP(a, b) fmin(a, b) +#else // ifdef IS_FLOAT +#define MAX_OP(a, b) max(a, b) +#define MIN_OP(a, b) min(a, b) +#endif // ifdef IS_FLOAT + #define UPDATE_OP(a, b) (b) #ifdef SCATTER_MP1D_2D_MPND -- cgit v1.2.1