Altera_Forum
Honored Contributor
8 years agoChannel Stall for Large Data
Hi, I'm a bit confused on how channel really works and right now facing difficulties to implement it in my project.
The channel stops when passing large amount of data from one kernel to another, but it works just nice for the small piece of data. After learned through the official documentation provided by Altera, we have a few doubts:
__kernel void producer(__global const int *src, const int iterations){
for(int i = 0; i<iterations;i++){
write_channel_altera(c0,src);
}
}
__kernel void consumer(const int iterations){
for(int i=0; i<iterations; ++i){
dst = read_channel_altera(c0);
}
}
Consider the example above: - Does the read_channel_altera will be executed right after the write_channel_altera takes place? Or the data only available after the producer kernel finish it's loop?
- In my case, I am using EnqueueTask kernel, Does channels works the same as in NDrange Kernel??