<?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: MKL_DIRECT_CALL and ICX in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-DIRECT-CALL-and-ICX/m-p/1440634#M34043</link>
    <description>&lt;P&gt;Will do! Thanks for following up.&lt;/P&gt;</description>
    <pubDate>Wed, 21 Dec 2022 23:06:45 GMT</pubDate>
    <dc:creator>AndrewC</dc:creator>
    <dc:date>2022-12-21T23:06:45Z</dc:date>
    <item>
      <title>MKL_DIRECT_CALL and ICX</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-DIRECT-CALL-and-ICX/m-p/1401309#M33411</link>
      <description>&lt;P&gt;Are there any limitations/caveats when using ICX ( Intel C++ Compiler 2022.2) and MKL_DIRECT_CALL. I am looking through some of the headers and notice some __INTEL_COMPILER blocks ( which is ICL specfic). It seems to be that ICX disables MKL_DIRECT_CALL. The snippet below is from the mkl_direct.h in MKL 2022.1.0. When MKL_DC_USE_C is 0, many of the direct calls are skipped. I am not sure why this is restricted to __INTEL_COMPILER. Simply forcing MKL_DC_USE_C to 1&amp;nbsp; for ICX seems to work just fine. I suppose it's not clear to me if MKL_DIRECT_CALL is abandonware now?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="cpp"&gt;#ifdef __INTEL_COMPILER
#define MKL_DC_USE_C 1
#if (__INTEL_COMPILER &amp;lt;= 1500)
#define MKL_DC_POTRF_DISABLE 1
#else
#define MKL_DC_POTRF_DISABLE 0
#endif
#elif defined(__GNUC__)
#if defined(__STRICT_ANSI__) &amp;amp;&amp;amp; !defined(__STDC_VERSION__)
#define MKL_DC_USE_C 0
#else
#define MKL_DC_USE_C 1
#endif
#define MKL_DC_POTRF_DISABLE 1
#else
#define MKL_DC_USE_C 0
#endif&lt;/LI-CODE&gt;
&lt;P&gt;. &lt;/P&gt;</description>
      <pubDate>Tue, 19 Jul 2022 15:36:26 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-DIRECT-CALL-and-ICX/m-p/1401309#M33411</guid>
      <dc:creator>AndrewC</dc:creator>
      <dc:date>2022-07-19T15:36:26Z</dc:date>
    </item>
    <item>
      <title>Re:MKL_DIRECT_CALL and ICX</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-DIRECT-CALL-and-ICX/m-p/1402533#M33425</link>
      <description>&lt;P&gt;Andrew,&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 16px; font-family: intel-clear;"&gt;MKL_DIRECT_CALL is not abandonware. We need to check this version. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 16px; font-family: intel-clear;"&gt;Checking the small gemm calls with/without direct call, I see the following perf results ( MKL v 2022.1.0 )  :&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;icx --version&lt;/P&gt;&lt;P&gt;Intel(R) oneAPI DPC++/C++ Compiler 2022.1.0 (2022.1.0.20220316)&lt;/P&gt;&lt;P&gt;  [2 x 2], SGEMM Execution Time == 6.798655e-08&amp;nbsp;sec&lt;/P&gt;&lt;P&gt;  [2 x 2], JIT_SGEMM Execution Time == 4.284084e-08 sec&amp;nbsp;&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;  [8 x 8], SGEMM Execution Time == 7.217750e-08&amp;nbsp;sec&lt;/P&gt;&lt;P&gt;  [8 x 8], JIT_SGEMM Execution Time == 4.936010e-08 sec&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;that's mean direct call mode works with jit version of gemm as well.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;-Gennady&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 22 Jul 2022 10:13:26 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-DIRECT-CALL-and-ICX/m-p/1402533#M33425</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2022-07-22T10:13:26Z</dc:date>
    </item>
    <item>
      <title>Re: Re:MKL_DIRECT_CALL and ICX</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-DIRECT-CALL-and-ICX/m-p/1402637#M33428</link>
      <description>&lt;P&gt;Code compiled&amp;nbsp; using ICX with MKL_DIRECT_CALL defined seems to skip the calls to the direct version (because&amp;nbsp; __INTEL_COMPILER is NOT defined)&lt;BR /&gt;&lt;BR /&gt;As I mentioned in my original post,&amp;nbsp; the "variable" MKL_DC_USE_C is defined "0" unless __INTEL_COMPILER is defined&lt;BR /&gt;&lt;BR /&gt;#define MKL_DC_GEMM3M_CHECKSIZE(m,n,k) (((*(m) &amp;lt;= 4 &amp;amp;&amp;amp; *(n) &amp;lt;= 4 &amp;amp;&amp;amp; *(k) &amp;lt;= 4)) &amp;amp;&amp;amp; MKL_DC_USE_C)&lt;BR /&gt;&lt;BR /&gt;Always evaluates to FALSE, so the direct call is never made - example below.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="cpp"&gt;#define zgemm(transa,transb,m,n,k,alpha,a,lda,b,ldb,beta,c,ldc)  MKL_DC_ZGEMM_CONVERT(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc)
#define zgemm_(transa,transb,m,n,k,alpha,a,lda,b,ldb,beta,c,ldc) MKL_DC_ZGEMM_CONVERT(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc)
#define ZGEMM(transa,transb,m,n,k,alpha,a,lda,b,ldb,beta,c,ldc)  MKL_DC_ZGEMM_CONVERT(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc)

/* ZGEMM3M */
#define MKL_DC_ZGEMM3M_CONVERT(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc)  do { \
    if (MKL_DC_GEMM3M_CHECKSIZE(m,n,k)) { \
        mkl_dc_zgemm((transa), (transb), (m), (n), (k), (alpha), (a), (lda), (b), (ldb), (beta), (c), (ldc));\
    } else {  \
        MKL_DIRECT_CALL_INIT_FLAG; \
        zgemm3m_direct((transa), (transb), (m), (n), (k), (alpha), (a), (lda), (b), (ldb), (beta), (c), (ldc), &amp;amp;mkl_direct_call_flag); \
    }\
} while (0)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Am I missing something here?&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jul 2022 18:00:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-DIRECT-CALL-and-ICX/m-p/1402637#M33428</guid>
      <dc:creator>AndrewC</dc:creator>
      <dc:date>2022-07-22T18:00:00Z</dc:date>
    </item>
    <item>
      <title>Re:MKL_DIRECT_CALL and ICX</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-DIRECT-CALL-and-ICX/m-p/1440455#M34036</link>
      <description>&lt;P&gt;Andrew,&lt;/P&gt;&lt;P&gt;Please check the latest version of MKL 2023 and let us know if the problem is still there.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Gennady&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 21 Dec 2022 12:36:20 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-DIRECT-CALL-and-ICX/m-p/1440455#M34036</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2022-12-21T12:36:20Z</dc:date>
    </item>
    <item>
      <title>Re: MKL_DIRECT_CALL and ICX</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-DIRECT-CALL-and-ICX/m-p/1440634#M34043</link>
      <description>&lt;P&gt;Will do! Thanks for following up.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Dec 2022 23:06:45 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-DIRECT-CALL-and-ICX/m-p/1440634#M34043</guid>
      <dc:creator>AndrewC</dc:creator>
      <dc:date>2022-12-21T23:06:45Z</dc:date>
    </item>
    <item>
      <title>Re: MKL_DIRECT_CALL and ICX</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-DIRECT-CALL-and-ICX/m-p/1442541#M34094</link>
      <description>&lt;P&gt;Hi Gennady,&lt;/P&gt;
&lt;P&gt;Just checked 2023.0 and its clear that has been taken care of.&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;Andrew&lt;/P&gt;</description>
      <pubDate>Thu, 29 Dec 2022 17:33:25 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-DIRECT-CALL-and-ICX/m-p/1442541#M34094</guid>
      <dc:creator>AndrewC</dc:creator>
      <dc:date>2022-12-29T17:33:25Z</dc:date>
    </item>
  </channel>
</rss>

