<?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:Execution gets stuck in batch GEMM when using AVX and libgomp in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Execution-gets-stuck-in-batch-GEMM-when-using-AVX-and-libgomp/m-p/1265014#M31029</link>
    <description>&lt;P&gt;Hi Guillaume,&lt;/P&gt;&lt;P&gt;I don't see this issue fixed into the coming 2021 update2 and very likely the fix is targeting to the update3.&lt;/P&gt;&lt;BR /&gt;</description>
    <pubDate>Wed, 17 Mar 2021 03:02:57 GMT</pubDate>
    <dc:creator>Gennady_F_Intel</dc:creator>
    <dc:date>2021-03-17T03:02:57Z</dc:date>
    <item>
      <title>Execution gets stuck in batch GEMM when using AVX and libgomp</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Execution-gets-stuck-in-batch-GEMM-when-using-AVX-and-libgomp/m-p/1259353#M30947</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;We are facing an issue with the function &lt;SPAN class="figgroup groupseq"&gt;&lt;SPAN class="keyword kwd"&gt;cblas_sgemm_batch_strided&lt;/SPAN&gt;&lt;/SPAN&gt; from oneMKL 2021.1. The execution gets stuck in this function when the code is run on a Intel CPU with AVX and compiled with GNU OpenMP (tested on Ubuntu 18.04 and CentOS 7). The same code used to work in Intel MKL 2020.4.&lt;/P&gt;
&lt;P&gt;The issue can be reproduced by setting MKL_CBWR=AVX (see below).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Code to reproduce:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="cpp"&gt;#include &amp;lt;mkl.h&amp;gt;

int main() {
  const MKL_INT batch_size = 256;

  const CBLAS_TRANSPOSE transa = CblasNoTrans;
  const CBLAS_TRANSPOSE transb = CblasTrans;

  const MKL_INT m = 1;
  const MKL_INT n = 1;
  const MKL_INT k = 64;

  const MKL_INT lda = k;
  const MKL_INT ldb = k;
  const MKL_INT ldc = n;

  const MKL_INT stridea = m * k;
  const MKL_INT strideb = k * n;
  const MKL_INT stridec = m * n;

  const float alpha = 1;
  const float beta = 0;

  const float* a = new float[batch_size * m * k];
  const float* b = new float[batch_size * n * k];
  float* c = new float[batch_size * m * n];

  cblas_sgemm_batch_strided(CblasRowMajor,
                            transa, transb,
                            m, n, k,
                            alpha,
                            a, lda, stridea,
                            b, ldb, strideb,
                            beta,
                            c, ldc, stridec,
                            batch_size);

  delete [] a;
  delete [] b;
  delete [] c;
}&lt;/LI-CODE&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;Compilation (Ubuntu 18.04):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;MKLROOT=/opt/intel/oneapi/mkl/2021.1.1
g++ -o gemm_batch gemm_batch.cc -L${MKLROOT}/lib/intel64 -Wl,--no-as-needed -lmkl_intel_ilp64 -lmkl_gnu_thread -lmkl_core -lgomp -lpthread -lm -ldl -DMKL_ILP64 -m64 -I"${MKLROOT}/include"&lt;/LI-CODE&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;Execution:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;MKL_CBWR=AVX LD_LIBRARY_PATH=${MKLROOT}/lib/intel64 ./gemm_batch&lt;/LI-CODE&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;Thanks for looking into this issue,&lt;/P&gt;
&lt;P&gt;Guillaume&lt;/P&gt;</description>
      <pubDate>Thu, 25 Feb 2021 17:27:42 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Execution-gets-stuck-in-batch-GEMM-when-using-AVX-and-libgomp/m-p/1259353#M30947</guid>
      <dc:creator>guillaumekln</dc:creator>
      <dc:date>2021-02-25T17:27:42Z</dc:date>
    </item>
    <item>
      <title>Re:Execution gets stuck in batch GEMM when using AVX and libgomp</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Execution-gets-stuck-in-batch-GEMM-when-using-AVX-and-libgomp/m-p/1259575#M30951</link>
      <description>&lt;P&gt;Guillaume,&lt;/P&gt;&lt;P&gt;Is that possible to check if the problem will still exist with Intel OMP threading? ( libmkl_intel_thread)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 26 Feb 2021 05:10:59 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Execution-gets-stuck-in-batch-GEMM-when-using-AVX-and-libgomp/m-p/1259575#M30951</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2021-02-26T05:10:59Z</dc:date>
    </item>
    <item>
      <title>Re: Execution gets stuck in batch GEMM when using AVX and libgomp</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Execution-gets-stuck-in-batch-GEMM-when-using-AVX-and-libgomp/m-p/1259586#M30953</link>
      <description>&lt;P&gt;I checked and manage to reproduce the problem on my end. the problem happens with any threading runtime libraries. The issue would be investigated and the tread would keep updated as soon as possible.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Feb 2021 06:20:30 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Execution-gets-stuck-in-batch-GEMM-when-using-AVX-and-libgomp/m-p/1259586#M30953</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2021-02-26T06:20:30Z</dc:date>
    </item>
    <item>
      <title>Re: Execution gets stuck in batch GEMM when using AVX and libgomp</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Execution-gets-stuck-in-batch-GEMM-when-using-AVX-and-libgomp/m-p/1259702#M30957</link>
      <description>&lt;P&gt;Hi Gennady,&lt;/P&gt;
&lt;P&gt;Thanks for looking into this issue.&lt;/P&gt;
&lt;P&gt;According to my tests the issue happens only with GNU OpenMP and not with Intel OpenMP.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Feb 2021 13:12:24 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Execution-gets-stuck-in-batch-GEMM-when-using-AVX-and-libgomp/m-p/1259702#M30957</guid>
      <dc:creator>guillaumekln</dc:creator>
      <dc:date>2021-02-26T13:12:24Z</dc:date>
    </item>
    <item>
      <title>Re:Execution gets stuck in batch GEMM when using AVX and libgomp</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Execution-gets-stuck-in-batch-GEMM-when-using-AVX-and-libgomp/m-p/1259719#M30958</link>
      <description>&lt;P&gt;it seems that the behavior depends on the specific CPU type as the problem happens when we change the code path ( by using MKL_CBWR). &lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 26 Feb 2021 15:22:35 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Execution-gets-stuck-in-batch-GEMM-when-using-AVX-and-libgomp/m-p/1259719#M30958</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2021-02-26T15:22:35Z</dc:date>
    </item>
    <item>
      <title>Re: Re:Execution gets stuck in batch GEMM when using AVX and libgomp</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Execution-gets-stuck-in-batch-GEMM-when-using-AVX-and-libgomp/m-p/1264884#M31023</link>
      <description>&lt;P&gt;Hi Gennady,&lt;/P&gt;
&lt;P&gt;I'm just wondering if we can expect a fix to be included in oneMKL 2021.2?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also to complete the first post, we always set MKL_CBWR=AUTO,STRICT when running our application. So I guess it turns into MKL_CBWR=AVX,STRICT on AVX systems.&lt;/P&gt;
&lt;P&gt;As a workaround, we changed the OpenMP runtime to Intel and it seems to work for us.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Mar 2021 17:48:18 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Execution-gets-stuck-in-batch-GEMM-when-using-AVX-and-libgomp/m-p/1264884#M31023</guid>
      <dc:creator>guillaumekln</dc:creator>
      <dc:date>2021-03-16T17:48:18Z</dc:date>
    </item>
    <item>
      <title>Re:Execution gets stuck in batch GEMM when using AVX and libgomp</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Execution-gets-stuck-in-batch-GEMM-when-using-AVX-and-libgomp/m-p/1265014#M31029</link>
      <description>&lt;P&gt;Hi Guillaume,&lt;/P&gt;&lt;P&gt;I don't see this issue fixed into the coming 2021 update2 and very likely the fix is targeting to the update3.&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 17 Mar 2021 03:02:57 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Execution-gets-stuck-in-batch-GEMM-when-using-AVX-and-libgomp/m-p/1265014#M31029</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2021-03-17T03:02:57Z</dc:date>
    </item>
    <item>
      <title>Re:Execution gets stuck in batch GEMM when using AVX and libgomp</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Execution-gets-stuck-in-batch-GEMM-when-using-AVX-and-libgomp/m-p/1276191#M31242</link>
      <description>&lt;P&gt;update - the fix of the issue is targeted to be available in the next update of oneMKL. We will keep this thread updated with the status of this release.&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 23 Apr 2021 14:54:11 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Execution-gets-stuck-in-batch-GEMM-when-using-AVX-and-libgomp/m-p/1276191#M31242</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2021-04-23T14:54:11Z</dc:date>
    </item>
    <item>
      <title>Re:Execution gets stuck in batch GEMM when using AVX and libgomp</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Execution-gets-stuck-in-batch-GEMM-when-using-AVX-and-libgomp/m-p/1295739#M31659</link>
      <description>&lt;P&gt;&lt;SPAN style="font-family: &amp;quot;Segoe UI&amp;quot;, sans-serif; font-size: 10pt;"&gt;The fix of the issue available in the official release of MKL 2021.3 which has happened yesterday. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: &amp;quot;Segoe UI&amp;quot;, sans-serif; font-size: 10pt;"&gt;You could take it to try and let us know the results.&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Sun, 04 Jul 2021 04:17:45 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Execution-gets-stuck-in-batch-GEMM-when-using-AVX-and-libgomp/m-p/1295739#M31659</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2021-07-04T04:17:45Z</dc:date>
    </item>
    <item>
      <title>Re:Execution gets stuck in batch GEMM when using AVX and libgomp</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Execution-gets-stuck-in-batch-GEMM-when-using-AVX-and-libgomp/m-p/1295740#M31660</link>
      <description>&lt;P&gt;here is the mkl verbose mode output&lt;/P&gt;&lt;P&gt;export MKL_CBWR=AVX&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;MKL_VERBOSE &lt;B&gt;oneMKL 2021.0 Update 3 &lt;/B&gt;Product build 20210617 for Intel(R) 64 architecture Intel(R) Advanced Vector Extensions (Intel(R) AVX) enabled processors, Lnx 2.20GHz ilp64 gnu_thread&lt;/P&gt;&lt;P&gt;MKL_VERBOSE SGEMM_BATCH_STRIDED(T,N,1,1,64,0x7ffd330bba98,0x22ab040,64,64,0x229b030,64,64,0x7ffd330bbaa0,0x22bb050,1,1,256) 20.38ms CNR:AVX Dyn:1 FastMM:1 TID:0&amp;nbsp;NThr:44&lt;/P&gt;&lt;P&gt;&lt;B&gt;...test passed ...&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Sun, 04 Jul 2021 04:24:38 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Execution-gets-stuck-in-batch-GEMM-when-using-AVX-and-libgomp/m-p/1295740#M31660</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2021-07-04T04:24:38Z</dc:date>
    </item>
    <item>
      <title>Re: Execution gets stuck in batch GEMM when using AVX and libgomp</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Execution-gets-stuck-in-batch-GEMM-when-using-AVX-and-libgomp/m-p/1295897#M31667</link>
      <description>&lt;P&gt;I confirm it is now working as expected.&lt;/P&gt;
&lt;P&gt;Thanks for the help!&lt;/P&gt;</description>
      <pubDate>Mon, 05 Jul 2021 07:09:40 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Execution-gets-stuck-in-batch-GEMM-when-using-AVX-and-libgomp/m-p/1295897#M31667</guid>
      <dc:creator>guillaumekln</dc:creator>
      <dc:date>2021-07-05T07:09:40Z</dc:date>
    </item>
    <item>
      <title>Re:Execution gets stuck in batch GEMM when using AVX and libgomp</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Execution-gets-stuck-in-batch-GEMM-when-using-AVX-and-libgomp/m-p/1295905#M31668</link>
      <description>&lt;P&gt;Thanks for the update.&lt;/P&gt;&lt;P&gt;This issue has been resolved and we will no longer respond to this thread.&amp;nbsp;If you require additional assistance from Intel, please start a new thread.&amp;nbsp;Any further interaction in this thread will be considered community only.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 05 Jul 2021 07:27:48 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Execution-gets-stuck-in-batch-GEMM-when-using-AVX-and-libgomp/m-p/1295905#M31668</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2021-07-05T07:27:48Z</dc:date>
    </item>
  </channel>
</rss>

