aboutsummaryrefslogtreecommitdiff
path: root/src/core/CL/cl_kernels/direct_convolution.cl
diff options
context:
space:
mode:
authorSheri Zhang <sheri.zhang@arm.com>2021-04-08 18:37:24 +0100
committerSheri Zhang <sheri.zhang@arm.com>2021-04-09 10:06:14 +0000
commitec82b95f26198dc538f94aa90f0febfaf0eb2751 (patch)
treebacfe3eeb3bab067f61bc314b29000b00ceeded5 /src/core/CL/cl_kernels/direct_convolution.cl
parentd340eb2015fbfca00769076a7169d5398f78bac9 (diff)
downloadComputeLibrary-ec82b95f26198dc538f94aa90f0febfaf0eb2751.tar.gz
Fix OpenCL kernel compiling failure with array initilizer
The issue is related with clang version, clang 3.9 has the problem, clange 4.0 works. The workaround is to add an extra {} to make this work. Resolves: COMPMID-4348 Signed-off-by: Sheri Zhang <sheri.zhang@arm.com> Change-Id: I2d8fc6400f32af5406fbf2d2556127a53b2ce918 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/5392 Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/core/CL/cl_kernels/direct_convolution.cl')
-rw-r--r--src/core/CL/cl_kernels/direct_convolution.cl10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/core/CL/cl_kernels/direct_convolution.cl b/src/core/CL/cl_kernels/direct_convolution.cl
index dde024faa4..96196bda8d 100644
--- a/src/core/CL/cl_kernels/direct_convolution.cl
+++ b/src/core/CL/cl_kernels/direct_convolution.cl
@@ -136,8 +136,8 @@ __kernel void direct_convolution_nhwc(
// .v = access the whole vector (OpenCL vector)
// .s[x] = access the vector element at position x (scalar access)
- TILE(int, M0, 1, xi) = { { 0 } };
- TILE(int, M0, 1, yi) = { { 0 } };
+ TILE(int, M0, 1, xi) = {{ { 0 } }};
+ TILE(int, M0, 1, yi) = {{ { 0 } }};
// Convert the linear index to coordinate
LOOP_UNROLLING(int, i, 0, M0, 1)
@@ -151,7 +151,7 @@ __kernel void direct_convolution_nhwc(
uint wei_x = 0;
// Initialize the accumulators
- TILE(ACC_DATA_TYPE, M0, N0, c) = { { 0 } };
+ TILE(ACC_DATA_TYPE, M0, N0, c) = {{ { 0 } }};
for(int i = 0; i < (_IWEI_WIDTH * _IWEI_HEIGHT); ++i)
{
@@ -159,8 +159,8 @@ __kernel void direct_convolution_nhwc(
int xk = i % _IWEI_WIDTH;
int yk = i / _IWEI_WIDTH;
- TILE(int, M0, 1, src_indirect_y) = { { 0 } };
- TILE(int, M0, 1, src_indirect_mask) = { { 0 } };
+ TILE(int, M0, 1, src_indirect_y) = {{ { 0 } }};
+ TILE(int, M0, 1, src_indirect_mask) = {{ { 0 } }};
// Calculate the source indirect Y and the source indirect mask
// Since the indirect Y is clamped when out-of-bound, the mask is used to