aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiorgio Arena <giorgio.arena@arm.com>2020-10-27 11:16:57 +0000
committerGiorgio Arena <giorgio.arena@arm.com>2020-10-27 16:43:05 +0000
commit19a41bad7fbbc18fc9032753b234b1f7c632b2d5 (patch)
tree13a69ad0fa09b8ffb65b76996be1b68b927b4c91
parent9ae06d4986bc3055f7786c1097b465bd321cf8eb (diff)
downloadComputeLibrary-19a41bad7fbbc18fc9032753b234b1f7c632b2d5.tar.gz
COMPMID-3927 CTS failure for OpenCL ElementwiseOperation
Change-Id: I1a82315dfa9b021f72e0b687da658e2e02c9bb34 Signed-off-by: Giorgio Arena <giorgio.arena@arm.com> Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/4257 Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Michele Di Giorgio <michele.digiorgio@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
-rw-r--r--src/core/CL/cl_kernels/elementwise_operation.cl2
-rw-r--r--src/core/CL/cl_kernels/elementwise_operation_quantized.cl2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/core/CL/cl_kernels/elementwise_operation.cl b/src/core/CL/cl_kernels/elementwise_operation.cl
index 211eb38dca..3519ef8ea7 100644
--- a/src/core/CL/cl_kernels/elementwise_operation.cl
+++ b/src/core/CL/cl_kernels/elementwise_operation.cl
@@ -38,7 +38,7 @@
#define SQUARED_DIFF(x, y) (x - y) * (x - y)
#define DIV(x, y) (x / y)
#define POWER(x, y) pow(x, y)
-#define PRELU(x, y) (select(y * x, x, x > (DATA_TYPE_OUT)0))
+#define PRELU(x, y) (select(y * x, x, CONVERT((x > (DATA_TYPE_OUT)0), SELECT_DATA_TYPE(DATA_TYPE_OUT, VEC_SIZE_OUT))))
#define OP_FUN_NAME_STR(op) elementwise_operation_##op
#define OP_FUN_NAME(op) OP_FUN_NAME_STR(op)
diff --git a/src/core/CL/cl_kernels/elementwise_operation_quantized.cl b/src/core/CL/cl_kernels/elementwise_operation_quantized.cl
index b7651f9927..0c512b4b4d 100644
--- a/src/core/CL/cl_kernels/elementwise_operation_quantized.cl
+++ b/src/core/CL/cl_kernels/elementwise_operation_quantized.cl
@@ -28,7 +28,7 @@
#define MAX(x, y) max((x), (y))
#define MIN(x, y) min((x), (y))
#define SQUARED_DIFF(x, y) (x - y) * (x - y)
-#define PRELU(x, y) (select(y * x, x, x > (DATA_TYPE_OUT)0))
+#define PRELU(x, y) (select(y * x, x, CONVERT((x > (DATA_TYPE_OUT)0), SELECT_DATA_TYPE(float, VEC_SIZE_OUT))))
#define DIV(x, y) (x / y)
#define CONVERT_RTE(x, type) (convert_##type##_rte((x)))