[Nightly Failure] Fix OpenCL kernel compilation for CLRange
authorGiorgio Arena <giorgio.arena@arm.com>
Thu, 7 Jan 2021 14:01:47 +0000 (14:01 +0000)
committerGiorgio Arena <giorgio.arena@arm.com>
Fri, 8 Jan 2021 13:51:05 +0000 (13:51 +0000)
- Change raw pointers in OpenCL kernel to __global uchar*

Resolves: COMPMID-4079

Change-Id: Ieeb99ced565bef59583216fd274958b29c7b2758
Signed-off-by: Giorgio Arena <giorgio.arena@arm.com>
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/4774
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Pablo Marquez Tello <pablo.tello@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
src/core/CL/cl_kernels/range.cl

index 55691016152a912e1483aa48481aee530ac07fb9..467b962b0de9d4882c9417cf44c2f5632df7509e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018-2020 Arm Limited.
+ * Copyright (c) 2018-2021 Arm Limited.
  *
  * SPDX-License-Identifier: MIT
  *
@@ -55,8 +55,8 @@
 __kernel void range(
     VECTOR_DECLARATION(out))
 {
-    uint     id                 = max((int)(get_global_id(0) * VECTOR_SIZE - (VECTOR_SIZE - VEC_SIZE_LEFTOVER) % VECTOR_SIZE), 0);
-    __global DATA_TYPE *dst_ptr = out_ptr + out_offset_first_element_in_bytes + id * sizeof(DATA_TYPE);
+    uint     id             = max((int)(get_global_id(0) * VECTOR_SIZE - (VECTOR_SIZE - VEC_SIZE_LEFTOVER) % VECTOR_SIZE), 0);
+    __global uchar *dst_ptr = out_ptr + out_offset_first_element_in_bytes + id * sizeof(DATA_TYPE);
 #if VECTOR_SIZE == 1
     DATA_TYPE seq;
     seq = (DATA_TYPE)START + (DATA_TYPE)id * (DATA_TYPE)STEP;
@@ -104,10 +104,10 @@ __kernel void range(
 __kernel void range_quantized(
     VECTOR_DECLARATION(out))
 {
-    uint     id                 = max((int)(get_global_id(0) * VECTOR_SIZE - (VECTOR_SIZE - VEC_SIZE_LEFTOVER) % VECTOR_SIZE), 0);
-    __global DATA_TYPE *dst_ptr = out_ptr + out_offset_first_element_in_bytes + id * sizeof(DATA_TYPE);
+    uint     id             = max((int)(get_global_id(0) * VECTOR_SIZE - (VECTOR_SIZE - VEC_SIZE_LEFTOVER) % VECTOR_SIZE), 0);
+    __global uchar *dst_ptr = out_ptr + out_offset_first_element_in_bytes + id * sizeof(DATA_TYPE);
 #if VECTOR_SIZE == 1
-    float               seq;
+    float           seq;
     seq      = (float)START + (float)id * (float)STEP;
     seq      = (DATA_TYPE)(int)(seq / ((float)SCALE_OUT) + (float)OFFSET_OUT);
     seq      = max(0.0f, min(seq, 255.0f));