<?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 event callback problem in OpenCL* for CPU</title>
    <link>https://community.intel.com/t5/OpenCL-for-CPU/event-callback-problem/m-p/773980#M219</link>
    <description>Thank you. This has indeed solved the problem.</description>
    <pubDate>Thu, 12 Apr 2012 11:02:55 GMT</pubDate>
    <dc:creator>r_ohara</dc:creator>
    <dc:date>2012-04-12T11:02:55Z</dc:date>
    <item>
      <title>event callback problem</title>
      <link>https://community.intel.com/t5/OpenCL-for-CPU/event-callback-problem/m-p/773978#M217</link>
      <description>I am trying to run an OpenCL kernel on a node with multiple CPU and GPU devices. As part of the scheduling, I use an event callback to notify when a kernel has finished, and a new kernel should be sent to the device. &lt;BR /&gt;&lt;BR /&gt;{&lt;BR /&gt; events[queue_num] = cl::Event();&lt;BR /&gt; error = queues_all_[queue_num]-&amp;gt;enqueueNDRangeKernel(*(stereoMatchKernels_all_[queue_num]), cl::NDRange(0), cl::NDRange(global_sizes[queue_num]), cl::NDRange(wkgrp_sizes[queue_num]), NULL, events+queue_num);&lt;BR /&gt; events[queue_num].setCallback(CL_COMPLETE, &amp;amp;signal_complete, (void *)(available_devices + queue_num));&lt;BR /&gt;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;...&lt;BR /&gt;&lt;BR /&gt;void CL_CALLBACK OpenCLPreparation::signal_complete(cl_event event, cl_int status, void* data)&lt;BR /&gt;{&lt;BR /&gt; /*Do something */&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;This works without a problem on the GPU devices, but the callback is only reached for a kernel sent to the CPU after a queue.finish() has been called. Until then, the CPU sits unused. This has been tested with both an i7 930, and dual Xeon 5600 under 64 bit Linux.&lt;BR /&gt;&lt;BR /&gt;Is there some problem with either the event callbacks, or the command queues in the Intel OpenCL SDK?</description>
      <pubDate>Wed, 11 Apr 2012 18:29:57 GMT</pubDate>
      <guid>https://community.intel.com/t5/OpenCL-for-CPU/event-callback-problem/m-p/773978#M217</guid>
      <dc:creator>r_ohara</dc:creator>
      <dc:date>2012-04-11T18:29:57Z</dc:date>
    </item>
    <item>
      <title>event callback problem</title>
      <link>https://community.intel.com/t5/OpenCL-for-CPU/event-callback-problem/m-p/773979#M218</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;Thank you for your feedback.&lt;BR /&gt;&lt;BR /&gt;This behaviour is expected.&lt;BR /&gt;&lt;BR /&gt;According to OpenCL spec. (5.13) you are expected to call clFlush() in order to insure command execution on a device.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Evgeny&lt;/P&gt;</description>
      <pubDate>Thu, 12 Apr 2012 04:10:14 GMT</pubDate>
      <guid>https://community.intel.com/t5/OpenCL-for-CPU/event-callback-problem/m-p/773979#M218</guid>
      <dc:creator>Evgeny_F_Intel</dc:creator>
      <dc:date>2012-04-12T04:10:14Z</dc:date>
    </item>
    <item>
      <title>event callback problem</title>
      <link>https://community.intel.com/t5/OpenCL-for-CPU/event-callback-problem/m-p/773980#M219</link>
      <description>Thank you. This has indeed solved the problem.</description>
      <pubDate>Thu, 12 Apr 2012 11:02:55 GMT</pubDate>
      <guid>https://community.intel.com/t5/OpenCL-for-CPU/event-callback-problem/m-p/773980#M219</guid>
      <dc:creator>r_ohara</dc:creator>
      <dc:date>2012-04-12T11:02:55Z</dc:date>
    </item>
  </channel>
</rss>

