OpenCL* for CPU
Ask questions and share information on Intel® SDK for OpenCL™ Applications and OpenCL™ implementations for Intel® CPU.
Announcements
This forum covers OpenCL* for CPU only. OpenCL* for GPU questions can be asked in the GPU Compute Software forum. Intel® FPGA SDK for OpenCL™ questions can be ask in the FPGA Intel® High Level Design forum.

Consumer Kernel with pipe

ZVere
Beginner
346 Views

Hello,

The following code is in a "consumer kernel":

//reserve pipe for reading
reserve_id_t rid = work_group_reserve_read_pipe(rng_pipe, szgr);
if(is_valid_reserve_id(rid)) {
  //read random number from the pipe.
  read_pipe(rng_pipe,rid,lid, &rn);
  work_group_commit_read_pipe(rng_pipe, rid);
  }

Is it possible that read_pipe will be blocked till it gets a vector of data written from a producer kernel ?

Regards,

Z.V

0 Kudos
1 Reply
Robert_I_Intel
Employee
346 Views

Hi Zvi,

We don't have concurrent kernels in the production driver, so producer kernel has to finish first and then consumer kernel will start. As you can imagine, this is not terribly useful, that's why I don't recommend currently to use pipes. But, to answer your question, in our current implementation of the driver it cannot happen for the above reason.

0 Kudos
Reply