- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello~
i am trying to use Pipe in OpenCL2.0, but in my code I use many different workgroups and CUs.
I have defined below attribute
__attribute__((num_compute_units(2)))
In my code it produces random values and put into different workgroups , for example 2 workgroups of 4x4 dimension each ,
write into the pipe, and then read from the pipe.
I found that that when CU = 1, values write and read from pipe are in order, but when CU > 2, write / read are not in order.
Does anyone has idea about how to read / write pipe in order with many different workgroups and CUs?
Thanks in advance!
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Which compiler are you using?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi AlexC,
- For many implementations of OpenCL it's useful to check the number of compute units up front via the hostside OpenCL API.
- https://www.khronos.org/registry/OpenCL/sdk/2.0/docs/man/xhtml/clGetDeviceInfo.html
- CL_DEVICE_MAX_COMPUTE_UNITS
- I recommend reviewing section 5.5 and in particular 5.5.3, 5.5.3.1 and 5.5.5, 5.5.5.3, 5.5.5.4 of the FPGA programming guide. https://www.altera.com/en_US/pdfs/literature/hb/opencl-sdk/aocl_programming_guide.pdf. These sections could identify where in order execution should and should not happen.
- Michael Kinser and Dirk Seynhaeve put together a nice primer on new extenstions related to pipes for Intel FPGA OpenCL implementations at IWOCL'18. It may have some useful overview references for how to use pipes in general:
- If you can provide an appropriate, minimally necessary reproducer (that doesn't have any proprietary bits)... it may be useful to show some source to your written description to get more feedback. Please consider using the attach feature in this forum.
Thanks,
-MichaelC

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