<?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 Hi AmonT, in OpenCL* for CPU</title>
    <link>https://community.intel.com/t5/OpenCL-for-CPU/Matrix-mulitplication-Hanged-with-Intel-GPU/m-p/1127470#M5689</link>
    <description>&lt;P&gt;Hi AmonT,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thanks for sharing the experience of your&amp;nbsp;development efforts.&lt;/P&gt;&lt;P&gt;I recommend checking the constraints reported from clGetDeviceInfo(...)... there are a handful of bitflags that correspond to maximum values the OpenCL device is capable of. Check the values for CL_DEVICE_MAX_* to see if the enqueued kernels and memory objects are exceeding any limits:&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.khronos.org/registry/OpenCL/sdk/2.0/docs/man/xhtml/clGetDeviceInfo.html"&gt;Reference&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Then there is also the kernel params from clGetKernelWorkgroupInfo(...)... Again check the values to see if the kernels themselves are constrained as necessary.&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.khronos.org/registry/OpenCL/sdk/2.0/docs/man/xhtml/clGetKernelWorkGroupInfo.html"&gt;Reference&lt;/A&gt;&lt;/P&gt;&lt;P&gt;If you could post a reproducer to this thread I'd be happy to give it a try... the setup and tear down on the host is needed as well... Please ensure&amp;nbsp; posted reproducers do not contain any privileged code. If there is an issue... we'd like to make sure the runtime shows a configuration issue or platform constraint more gracefully/clearly.&lt;/P&gt;&lt;P&gt;Are you on Linux OS or Windows OS? In either case you may wish to check for an updated Intel® Graphics driver and OpenCL runtime.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Windows - Check the system vendor website first before going to downloadcenter.intel.com. Vendors may have support or warranty criteria.&lt;/LI&gt;&lt;LI&gt;Linux - Try beignet. Broadwell and newer systems want to see linux 4.11 with the NEO runtime...&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I don't think any of the first party runtime builds for Haswell based processors are actively supported by Intel anymore. This excludes&amp;nbsp;anything prior to NEO runtume which wants broadwell or newer.&lt;/P&gt;&lt;P&gt;A dump from a clinfo type application could be useful... Note that the SDK has something like clinfo embedded with the IDE (either Eclipse or Visual studio)... Look for the&amp;nbsp;&lt;STRONG&gt;Code Builder Platform Info Tree.&amp;nbsp;&lt;/STRONG&gt;But again, these plugins aren't supported on Haswell for Intel® Graphics.&amp;nbsp; Please consider reviewing the support matrix from the SDK tools &lt;A href="https://software.intel.com/articles/intel-sdk-for-opencl-applications-release-notes"&gt;release notes&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-MichaelC&lt;/P&gt;</description>
    <pubDate>Wed, 17 Apr 2019 01:12:06 GMT</pubDate>
    <dc:creator>Michael_C_Intel1</dc:creator>
    <dc:date>2019-04-17T01:12:06Z</dc:date>
    <item>
      <title>Matrix mulitplication - Hanged with Intel GPU</title>
      <link>https://community.intel.com/t5/OpenCL-for-CPU/Matrix-mulitplication-Hanged-with-Intel-GPU/m-p/1127469#M5688</link>
      <description>&lt;P&gt;I am experimenting opencl with examples from the book OpenCL in Action. I found different behaviors on different devices. Below is the kernel code about matrix multiplication I am in trouble with.&lt;/P&gt;
&lt;PRE class="brush:cpp; class-name:dark;"&gt;__kernel void matrix_mult(__global float4 *a_mat, 
      __global float4 *b_mat, __global float *c_mat) {

   float sum;

   int num_rows = get_global_size(0);
   int vectors_per_row = num_rows/4;
   int start = get_global_id(0) * vectors_per_row;
   a_mat += start;
   c_mat += start*4;

   for(int i=0; i&amp;lt;num_rows; i++) {
      sum = 0.0f;
      for(int j=0; j&amp;lt;vectors_per_row; j++) {
         sum += dot(a_mat&lt;J&gt;, b_mat[i * vectors_per_row + j]);
      }
      c_mat&lt;I&gt; = sum;
   }
}&lt;/I&gt;&lt;/J&gt;&lt;/PRE&gt;

&lt;P&gt;I am testing with Intel Opencl SDK 2019 on Intel CPU i7-4600U and Intel GPU HD Graphics 4400. Both devices (CPU and GPU) can complete the kernel successfully on matrix size 1024x1024 floats (the kernel is executed&amp;nbsp;with global size set to 1024). However, if I increase the matrix size to 2048x2048 (the kernel is then executed with global size set to 2048), kernel execution can still be completed using CPU.&amp;nbsp;However&amp;nbsp;kernel execution hangs on GPU without return.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The issue seems devices specific. If I commented out the line inside the for loop (i.e. the line with sum+= dot…), then Intel GPU can complete the kernel execution.&lt;/P&gt;
&lt;P&gt;I wonder the issue may be related to the conflict of global memory access of a_mat and b_mat across different processing elements.&lt;/P&gt;
&lt;P&gt;May any experts offer me any advice to figure out a solution?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Apr 2019 09:52:09 GMT</pubDate>
      <guid>https://community.intel.com/t5/OpenCL-for-CPU/Matrix-mulitplication-Hanged-with-Intel-GPU/m-p/1127469#M5688</guid>
      <dc:creator>Tse__Amon</dc:creator>
      <dc:date>2019-04-12T09:52:09Z</dc:date>
    </item>
    <item>
      <title>Hi AmonT,</title>
      <link>https://community.intel.com/t5/OpenCL-for-CPU/Matrix-mulitplication-Hanged-with-Intel-GPU/m-p/1127470#M5689</link>
      <description>&lt;P&gt;Hi AmonT,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thanks for sharing the experience of your&amp;nbsp;development efforts.&lt;/P&gt;&lt;P&gt;I recommend checking the constraints reported from clGetDeviceInfo(...)... there are a handful of bitflags that correspond to maximum values the OpenCL device is capable of. Check the values for CL_DEVICE_MAX_* to see if the enqueued kernels and memory objects are exceeding any limits:&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.khronos.org/registry/OpenCL/sdk/2.0/docs/man/xhtml/clGetDeviceInfo.html"&gt;Reference&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Then there is also the kernel params from clGetKernelWorkgroupInfo(...)... Again check the values to see if the kernels themselves are constrained as necessary.&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.khronos.org/registry/OpenCL/sdk/2.0/docs/man/xhtml/clGetKernelWorkGroupInfo.html"&gt;Reference&lt;/A&gt;&lt;/P&gt;&lt;P&gt;If you could post a reproducer to this thread I'd be happy to give it a try... the setup and tear down on the host is needed as well... Please ensure&amp;nbsp; posted reproducers do not contain any privileged code. If there is an issue... we'd like to make sure the runtime shows a configuration issue or platform constraint more gracefully/clearly.&lt;/P&gt;&lt;P&gt;Are you on Linux OS or Windows OS? In either case you may wish to check for an updated Intel® Graphics driver and OpenCL runtime.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Windows - Check the system vendor website first before going to downloadcenter.intel.com. Vendors may have support or warranty criteria.&lt;/LI&gt;&lt;LI&gt;Linux - Try beignet. Broadwell and newer systems want to see linux 4.11 with the NEO runtime...&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I don't think any of the first party runtime builds for Haswell based processors are actively supported by Intel anymore. This excludes&amp;nbsp;anything prior to NEO runtume which wants broadwell or newer.&lt;/P&gt;&lt;P&gt;A dump from a clinfo type application could be useful... Note that the SDK has something like clinfo embedded with the IDE (either Eclipse or Visual studio)... Look for the&amp;nbsp;&lt;STRONG&gt;Code Builder Platform Info Tree.&amp;nbsp;&lt;/STRONG&gt;But again, these plugins aren't supported on Haswell for Intel® Graphics.&amp;nbsp; Please consider reviewing the support matrix from the SDK tools &lt;A href="https://software.intel.com/articles/intel-sdk-for-opencl-applications-release-notes"&gt;release notes&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-MichaelC&lt;/P&gt;</description>
      <pubDate>Wed, 17 Apr 2019 01:12:06 GMT</pubDate>
      <guid>https://community.intel.com/t5/OpenCL-for-CPU/Matrix-mulitplication-Hanged-with-Intel-GPU/m-p/1127470#M5689</guid>
      <dc:creator>Michael_C_Intel1</dc:creator>
      <dc:date>2019-04-17T01:12:06Z</dc:date>
    </item>
    <item>
      <title>Hello Michael,</title>
      <link>https://community.intel.com/t5/OpenCL-for-CPU/Matrix-mulitplication-Hanged-with-Intel-GPU/m-p/1127471#M5690</link>
      <description>&lt;P&gt;Hello Michael,&lt;/P&gt;&lt;P&gt;Thank you for your information. I am not aware that the GPU hardware I am testing is no longer supported by Intel Studio 2019. I tested the same piece of code in AMD Vega12 GPU and it is working. I believe my issue is likely hardware compatibility issue. My case can be closed.&lt;/P&gt;&lt;P&gt;- Amon&lt;/P&gt;</description>
      <pubDate>Wed, 17 Apr 2019 02:19:13 GMT</pubDate>
      <guid>https://community.intel.com/t5/OpenCL-for-CPU/Matrix-mulitplication-Hanged-with-Intel-GPU/m-p/1127471#M5690</guid>
      <dc:creator>Tse__Amon</dc:creator>
      <dc:date>2019-04-17T02:19:13Z</dc:date>
    </item>
    <item>
      <title>Hi AmonT,</title>
      <link>https://community.intel.com/t5/OpenCL-for-CPU/Matrix-mulitplication-Hanged-with-Intel-GPU/m-p/1127472#M5691</link>
      <description>&lt;P&gt;Hi AmonT,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the interest and the response.&lt;/P&gt;&lt;P&gt;Aligning the program with constraints interrogated from that Haswell Graphics&amp;nbsp;&lt;STRONG&gt;runtime&lt;/STRONG&gt;&amp;nbsp;may produce useful parameters.... Those parameters may&amp;nbsp;allow the program to function if scheduling is used.&amp;nbsp;OpenCL programs use dynamically interrogated parameters&amp;nbsp;to maintain maximum portability and future proofing. In this case, since Haswell systems&amp;nbsp;are popular it's still worthwhile for us to&amp;nbsp;observe the&amp;nbsp;issue if you can submit attachments... If it's arduous don't worry about it... I'd like to give some more context for anonymous forum viewers:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Clarifications:&lt;/P&gt;&lt;P&gt;For many users and developers&amp;nbsp;it's unclear... Please note there is a difference between&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;SDK&lt;/STRONG&gt;&amp;nbsp;support to develop OpenCL programs and&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;r&lt;/STRONG&gt;&lt;STRONG&gt;untime&lt;/STRONG&gt;&amp;nbsp;support as it executes an OpenCL program.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;SDK OCL Debuggers and plugins are not currently supported for&amp;nbsp;older Haswell &lt;STRONG&gt;graphics&lt;/STRONG&gt; hardware. SDK OCL tools are&amp;nbsp;supported for Haswell CPU. Functionality on Haswell &lt;STRONG&gt;graphics&lt;/STRONG&gt; for SDK debuggers and plugins is unknown. See &lt;A href="https://software.intel.com/articles/intel-sdk-for-opencl-applications-release-notes"&gt;release notes&lt;/A&gt; to with respect to Haswell and older platforms (CPU is supported).&lt;/P&gt;&lt;P&gt;OpenCL runtimes are not currently supported by Intel on Haswell&amp;nbsp;&lt;STRONG&gt;graphics&lt;/STRONG&gt;&amp;nbsp;hardware. Keep in mind OpenCL runtimes exist&amp;nbsp;and were supported at one time. It is expected that on a Haswell + Intel Graphics capable system, graphics drivers including OpenCL runtimes will be deployed as a part of Windows 10 stock that are out of date. There may be&amp;nbsp;even be some applicable, albeit unsupported, updates&amp;nbsp;to OpenCL included that improve functionality. See release notes either from 1) system vendor graphics drivers package... 2) downloadcenter.intel.com graphics driver packages and from beignet on Linux systems... Beignet may have some useful guidance in particular.&lt;/P&gt;&lt;P&gt;Please see documentation here:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;A href="http://software.intel.com/articles/intel-sdk-for-opencl-applications-release-notes"&gt;SDK Release Notes&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;&lt;A href="https://software.intel.com/en-us/articles/opencl-runtime-release-notes"&gt;CPU RT Release notes&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;&lt;A href="https://github.com/intel/compute-runtime/releases"&gt;Intel Graphics Compute Runtime Release Notes&lt;/A&gt;&amp;nbsp;(Broadwell and newer)&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-MichaelC&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Apr 2019 04:22:48 GMT</pubDate>
      <guid>https://community.intel.com/t5/OpenCL-for-CPU/Matrix-mulitplication-Hanged-with-Intel-GPU/m-p/1127472#M5691</guid>
      <dc:creator>Michael_C_Intel1</dc:creator>
      <dc:date>2019-04-17T04:22:48Z</dc:date>
    </item>
  </channel>
</rss>

