<?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 Bug report: clCreateKernelsInProgram is not thread-safe in OpenCL* for CPU</title>
    <link>https://community.intel.com/t5/OpenCL-for-CPU/Bug-report-clCreateKernelsInProgram-is-not-thread-safe/m-p/1159771#M6298</link>
    <description>&lt;P&gt;When invoking&amp;nbsp;clCreateKernelsInProgram to the same cl_program from many different threads. The Intel OpenCL runtime will randomly raise a CL_INVALID_VALUE error.&lt;/P&gt;</description>
    <pubDate>Mon, 26 Mar 2018 03:53:58 GMT</pubDate>
    <dc:creator>Bo__Yang</dc:creator>
    <dc:date>2018-03-26T03:53:58Z</dc:date>
    <item>
      <title>Bug report: clCreateKernelsInProgram is not thread-safe</title>
      <link>https://community.intel.com/t5/OpenCL-for-CPU/Bug-report-clCreateKernelsInProgram-is-not-thread-safe/m-p/1159771#M6298</link>
      <description>&lt;P&gt;When invoking&amp;nbsp;clCreateKernelsInProgram to the same cl_program from many different threads. The Intel OpenCL runtime will randomly raise a CL_INVALID_VALUE error.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Mar 2018 03:53:58 GMT</pubDate>
      <guid>https://community.intel.com/t5/OpenCL-for-CPU/Bug-report-clCreateKernelsInProgram-is-not-thread-safe/m-p/1159771#M6298</guid>
      <dc:creator>Bo__Yang</dc:creator>
      <dc:date>2018-03-26T03:53:58Z</dc:date>
    </item>
    <item>
      <title>It should be thread safe</title>
      <link>https://community.intel.com/t5/OpenCL-for-CPU/Bug-report-clCreateKernelsInProgram-is-not-thread-safe/m-p/1159772#M6299</link>
      <description>&lt;P&gt;It should be thread safe according to OpenCL specification&amp;nbsp;appendix A.2 ("Multiple Host Threads")&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;
	&lt;STYLE type="text/css"&gt;p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica}
span.s1 {font: 8.0px Helvetica}
	&lt;/STYLE&gt;
&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
	&lt;P class="p1"&gt;All OpenCL API calls are thread-safe&lt;SPAN class="s1"&gt;&amp;nbsp;&lt;/SPAN&gt;except clSetKernelArg.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Mon, 26 Mar 2018 03:59:43 GMT</pubDate>
      <guid>https://community.intel.com/t5/OpenCL-for-CPU/Bug-report-clCreateKernelsInProgram-is-not-thread-safe/m-p/1159772#M6299</guid>
      <dc:creator>Bo__Yang</dc:creator>
      <dc:date>2018-03-26T03:59:43Z</dc:date>
    </item>
    <item>
      <title>Hi YangB,</title>
      <link>https://community.intel.com/t5/OpenCL-for-CPU/Bug-report-clCreateKernelsInProgram-is-not-thread-safe/m-p/1159773#M6300</link>
      <description>&lt;P&gt;Hi YangB,&lt;/P&gt;

&lt;P&gt;Thanks for your sighting.&lt;/P&gt;

&lt;UL&gt;
	&lt;LI&gt;Which OCL runtime are you using and for which platform? Can you identify the version and/or install package you used?&lt;/LI&gt;
	&lt;LI&gt;If you're using a runtime that leverages ocl spec &amp;gt;= 2.0 it's slightly different, if read extremely strictly the spec's section A.2 suggests any function that modifies the state of cl_kernel objects is not thread safe.
		&lt;UL&gt;
			&lt;LI&gt;&lt;SPAN style="font-size: 1em;"&gt;Consequently, as a future proof solution I recommend staying away from unguarded&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 12px;"&gt;clCreateKernelsInProgram calls in multiple host threads. My intent here is not to garner a discussion on how the spec should be or is, just an observation for how it can be interpreted.&lt;/SPAN&gt;&lt;/LI&gt;
			&lt;LI&gt;&lt;SPAN style="font-size: 12px;"&gt;API References:&lt;/SPAN&gt;
				&lt;UL&gt;
					&lt;LI&gt;&lt;SPAN style="font-size: 12px;"&gt;​2.0&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.008px;"&gt;&lt;A href="https://www.khronos.org/registry/OpenCL/sdk/2.0/docs/man/xhtml/clCreateKernelsInProgram.html" target="_blank"&gt;https://www.khronos.org/registry/OpenCL/sdk/2.0/docs/man/xhtml/clCreateKernelsInProgram.html&lt;/A&gt;&lt;/SPAN&gt;&lt;/LI&gt;
					&lt;LI&gt;&lt;SPAN style="font-size: 13.008px;"&gt;1.2&amp;nbsp;https://www.khronos.org/registry/OpenCL/sdk/1.2/docs/man/xhtml/clCreateKernelsInProgram.html&lt;/SPAN&gt;&lt;/LI&gt;
				&lt;/UL&gt;
			&lt;/LI&gt;
			&lt;LI&gt;Spec References:
				&lt;UL&gt;
					&lt;LI&gt;&lt;SPAN style="font-size: 13.008px;"&gt;&lt;A href="https://www.khronos.org/registry/OpenCL/specs/opencl-2.0.pdf" target="_blank"&gt;https://www.khronos.org/registry/OpenCL/specs/opencl-2.0.pdf&lt;/A&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.008px;"&gt;​&lt;/SPAN&gt;&lt;/LI&gt;
					&lt;LI&gt;&lt;SPAN style="font-size: 13.008px;"&gt;&lt;A href="https://www.khronos.org/registry/OpenCL/specs/opencl-1.2.pdf" target="_blank"&gt;https://www.khronos.org/registry/OpenCL/specs/opencl-1.2.pdf&lt;/A&gt;&lt;/SPAN&gt;&lt;/LI&gt;
				&lt;/UL&gt;
			&lt;/LI&gt;
		&lt;/UL&gt;
	&lt;/LI&gt;
	&lt;LI&gt;&lt;SPAN style="font-size: 12px;"&gt;​Ca&lt;/SPAN&gt;&lt;SPAN style="font-size: 12px;"&gt;n you give a minimal reproducer to demonstrate the issue? (While staying away from unsharable code of course?)&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;&lt;SPAN style="font-size: 12px;"&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;-MichaelC&lt;/P&gt;</description>
      <pubDate>Tue, 27 Mar 2018 21:47:36 GMT</pubDate>
      <guid>https://community.intel.com/t5/OpenCL-for-CPU/Bug-report-clCreateKernelsInProgram-is-not-thread-safe/m-p/1159773#M6300</guid>
      <dc:creator>Michael_C_Intel1</dc:creator>
      <dc:date>2018-03-27T21:47:36Z</dc:date>
    </item>
  </channel>
</rss>

