- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello:
I have been trying to implement the "Implementation of Buffer Management for OpenCL Kernels" from the Programming Guide.
With a simple aproach, my goal is to copy data from a pipe to global memory, and have the consumer copy some part of this buffer to be able to transfer it to host. This is kind of a ping-pong buffer.
First to iterations work well, if I try to continuously run it, it stalls.
Has anyone successfully implemented this example?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Self-answer, maybe helps someone.
I have observed that my consumer kernels need more time to execute the first time than succesive executions. This causes synchronization issues.
I wonder this is because they use host allocated buffers.
Any insight is apreciated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
This approach should work well when the producer and consumer kernels are operating on large chunks of contiguous memory so that the large DDR access penalty is hidden. It looks like you just want to read some data from global memory, compute some results with it, and then write the results back into global memory for the host to read. If this is the case, then I think it would be best to create a channel between the producer and consumer kernel to minimize latency.
To debug the stalling issue, I suggest compiling and running the design with the profiler enabled. Knowing the memory access pattern (sequential, random, etc.) would also help.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes. The issue on the stalling was already solved and a new issue arised that I explained on
https://forums.intel.com/s/question/0D50P00004IQXgeSAH/separate-queue-synchronization-and-buffer-data-corruption-on-feedforward-design-model-with-buffer-management
Thanks for the support.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page