Altera_Forum
Honored Contributor
11 years agoError when specifying max work group size
Hi everyone,
I just find out that whenever I try to add max_work_group_size(X, Y, Z) attribute to a kernel I get the following error: "error: attribute takes one argument" Not even the example supplied by the programming guide compiles: "aoc -v -c sum.claoc: Environment checks are completed successfully. aoc: Selected target board de5net_a7 aoc: Running OpenCL parser.... c:/Users/RT/Desktop/sum.cl:1:16: error: attribute takes one argument __attribute__((max_work_group_size(64,1,1))) ^ 1 error generated. Error: OpenCL parser FAILED. Refer to sum/sum.log for details." Where the ^ pointer points at letter 'm' of "max_work_group_size". This is the source code from the example by the way: "__attribute__((max_work_group_size(64,1,1))) __kernel void sum (__global const float * restrict a, __global const float * restrict b, __global float * restrict answer) { size_t gid = get_global_id(0); answer[gid] = a[gid] + b[gid]; }" This happens on both Linux and windows version 15 of AOCL, but "reqd_work_group_size(X, Y, Z)" works just fine. I don't know if this is a bug of the compiler or am I missing something? Thanks in advance!