COMPMID-3927 CTS failure for OpenCL ElementwiseOperation
authorGiorgio Arena <giorgio.arena@arm.com>
Tue, 27 Oct 2020 11:16:57 +0000 (11:16 +0000)
committerGiorgio Arena <giorgio.arena@arm.com>
Tue, 27 Oct 2020 16:43:05 +0000 (16:43 +0000)
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>

src/core/CL/cl_kernels/elementwise_operation.cl
src/core/CL/cl_kernels/elementwise_operation_quantized.cl

index 211eb38dca35f23c4123d43bb8a794573e46279f..3519ef8ea7a237fec3fda74d0d2fd43c72dd76d1 100644 (file)
@@ -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)
index b7651f9927ebf0bdaa79f26b9b01022d449174a3..0c512b4b4d95171b5ab166f20ed7f6edd19263ba 100644 (file)
@@ -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)))