title: OpenCL 2.x pipes - how do they actually work?
body: <p>I've read <a href="http://developer.amd.com/community/blog/2014/10/31/opencl-2-0-pipes/" rel="nofollow">this description</a> of the OpenCL 2.x pipe API and leaded through the <a href="https://www.khronos.org/registry/cl/sdk/2.1/docs/man/xhtml/pipeFunctions.html" rel="nofollow">Pipe API pages</a> at khronos.org. I felt kind of jealous, working in CUDA almost exclusively, of this nifty feature available only in OpenCL (and sorry that CUDA functionality has not been properly subsumed by OpenCL, but that's a different issue), so I thought I'd ask "How come CUDA doesn't have a pipe mechanism". But then I realized I don't even know what that would mean exactly. So, instead, I'll ask:</p>
  
  <ol>
  <li><p>How do OpenCL pipes work on AMD discrete GPUs / APUs?  ...</p>
  
  <ul>
  <li>What info gets written where? </li>
  <li>How does the scheduling of kernel workgroups to cores effected by the use of pipes? </li>
  <li>Do piped kernels get compiled together (say, their SPIR forms)?</li>
  <li>Does the use of pipes allow passing data between different kernels via the core-specific cache ("local memory" in OpenCL parlance, "shared memory" in CUDA parlance)? That would be awesome.</li>
  </ul></li>
  <li>Is there a way pipes are "supposed" to work on a GPU, generally? i.e. something the API authors envisioned or even put in writing?</li>
  <li>How do OpenCL pipes work in CPU-based OpenCL implementations?</li>
  </ol>