- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I modify the host code of example design.
The original part in launching the first kernel is
status = clEnqueueNDRangeKernel(queue, kernel, 1, NULL, gsize, lsize, 0, NULL, NULL)
I modify this part to
// define NDRange Size
size_t gsize[1]={(size_t) 10};
size_t lsize[1] = {(size_t) 2};
status = clEnqueueNDRangeKernel(queue, kernel, 1, NULL, gsize, lsize, 0, NULL, NULL)
Then I run the code it returns error code -54. Why can't I increase the 1-d lsize to 2?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is there any reqd_work_group_size or max_work_group_size used in the kernel?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
May I know the software version and edition you are using? Could you share the error message and provide the design for investigation?
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The software is quartus 16.0.2 pro with all update patches installed. My OpenCL is v2.0.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is there any reqd_work_group_size or max_work_group_size used in the kernel?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You remind me. There's neither reqd_work_group_size nor max_work_group_size, but at the head of each kernel function there's a declaration __attribute__((task)) which implicitly indicates the max work group dimension is 0. The max group work items is 1. So here's problem. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
So the kernel is not even NDRange. 😅
Be careful that just removing that attribute will not convert the kernel to NDRange; you will need to rewrite the kernel and replace the loops in it with get_global_id()/get_local_id().
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the further reminder. I'm new to HARP2 and OpenCL and maybe I need to go back to the programming manual.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page