- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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!Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
the syntax of the attribute should be __attribute__((max_work_group_size(SIZE)),so just one argument as the compiler error suggested. Cheers, Sergio- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Sergio! I discovered this sometime ago but I forgot to update the thread...
Cheers, Ryan
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page