<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How avoid memory copy GPU-CPU on imx6qp opencl? in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/How-avoid-memory-copy-GPU-CPU-on-imx6qp-opencl/m-p/1313914#M177527</link>
    <description>&lt;P&gt;Hello koralbelnikov,&lt;/P&gt;
&lt;P&gt;Sorry you can avoid copy GPU/CPU when using OPenCL since the driver is from Vivante corp in binary form, you have to modify the driver source code to do this task, and is not provided, however if you have the source code please enter a case in our system.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 27 Jul 2021 13:12:13 GMT</pubDate>
    <dc:creator>Bio_TICFSL</dc:creator>
    <dc:date>2021-07-27T13:12:13Z</dc:date>
    <item>
      <title>How avoid memory copy GPU-CPU on imx6qp opencl?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-avoid-memory-copy-GPU-CPU-on-imx6qp-opencl/m-p/1313101#M177452</link>
      <description>&lt;P&gt;I use gpu through opencl (pyopencl wrapper namely) and I found that necessity coping memory to gpu before calculations and from gpu after calculations.&lt;/P&gt;&lt;P&gt;A memory on the chip is shared, so these copying may be excess. How to do this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;p.s. some authors write that avoid copying.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="korabelnikov_0-1627287955021.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/150815i18CB367F79E64696/image-size/medium?v=v2&amp;amp;px=400" role="button" title="korabelnikov_0-1627287955021.png" alt="korabelnikov_0-1627287955021.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;code example. I've tried with&amp;nbsp;cl.enqueue_map but without succes, maybe i did something wrong.&lt;/P&gt;&lt;LI-SPOILER&gt;&lt;PRE&gt;res_hist = np.zeros((height, width)).astype(np.float32)&lt;BR /&gt;res_hist_g = cl.Buffer(ctx, mf.WRITE_ONLY | mf.USE_HOST_PTR, &lt;SPAN&gt;hostbuf&lt;/SPAN&gt;=res_hist)&lt;BR /&gt;&lt;BR /&gt;kernel(queue, res_hist.shape, &lt;SPAN&gt;None&lt;/SPAN&gt;, input_buffer, res_hist_g)&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# this copy is necessary!&lt;BR /&gt;&lt;/SPAN&gt;cl.enqueue_copy(queue, res_hist, res_hist_g, &lt;SPAN&gt;is_blocking&lt;/SPAN&gt;=&lt;SPAN&gt;True&lt;/SPAN&gt;)&lt;/PRE&gt;&lt;/LI-SPOILER&gt;</description>
      <pubDate>Mon, 26 Jul 2021 08:27:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-avoid-memory-copy-GPU-CPU-on-imx6qp-opencl/m-p/1313101#M177452</guid>
      <dc:creator>korabelnikov</dc:creator>
      <dc:date>2021-07-26T08:27:51Z</dc:date>
    </item>
    <item>
      <title>Re: How avoid memory copy GPU-CPU on imx6qp opencl?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-avoid-memory-copy-GPU-CPU-on-imx6qp-opencl/m-p/1313914#M177527</link>
      <description>&lt;P&gt;Hello koralbelnikov,&lt;/P&gt;
&lt;P&gt;Sorry you can avoid copy GPU/CPU when using OPenCL since the driver is from Vivante corp in binary form, you have to modify the driver source code to do this task, and is not provided, however if you have the source code please enter a case in our system.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jul 2021 13:12:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-avoid-memory-copy-GPU-CPU-on-imx6qp-opencl/m-p/1313914#M177527</guid>
      <dc:creator>Bio_TICFSL</dc:creator>
      <dc:date>2021-07-27T13:12:13Z</dc:date>
    </item>
  </channel>
</rss>

