Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Altera_Forum
Honored Contributor I
1,046 Views

Pipes OpenCL

Hello everyone, 

What is the main advantage of using pipes on Altera OpenCL SDK? I'm still trying to figure out why separating the codes in different kernels. If possible, I would like an example. 

 

 

Thank you :)
0 Kudos
4 Replies
Altera_Forum
Honored Contributor I
21 Views

The main advantage of channels (and pipes) is "ease of programming" which comes at the cost of higher area overhead and some restrictions on what you can do in your kernel (e.g. no SIMD or parallel work groups are supported in NDRange kernels that use channels). You can always do what you do with channels, without channels, but it will likely require [much] more programming effort. 

 

For NDRange kernels it regularly makes sense to have multiple kernels with different local and global work size. For single work-item kernels, it rarely makes sense to have multiple kernels because it would just result in area waste caused by extra kernel interfaces. Though in all cases one might want to have multiple kernels and connect them with channels to reduce programming effort. Sometimes it might also make sense to mix NDRange and single work-item kernels and connect them with channels so that each kernel type is used for the part of the computation that better matches it; e.g. DDR memory performance is generally higher in NDRange kernels while loops with iteration dependencies work better in single work-item. 

 

You can find multiple examples of applications with multiple kernels and channels among Altera's examples here (https://www.altera.com/products/design-software/embedded-software-developers/opencl/developer-zone.h...). Search for the word "channel" in the "Design Examples" page.
Altera_Forum
Honored Contributor I
21 Views

Thank you, very helpful your information again :)

Altera_Forum
Honored Contributor I
21 Views

Is there any pipes example  

thanks
Altera_Forum
Honored Contributor I
21 Views

 

--- Quote Start ---  

Is there any pipes example  

thanks 

--- Quote End ---  

 

 

Check Altera's design example page which I linked in my previous reply.