<?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: Missing dormqr equivalent in MKL Compact API for QR-based Batch Solve in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Missing-dormqr-equivalent-in-MKL-Compact-API-for-QR-based-Batch/m-p/1752979#M37618</link>
    <description>&lt;P&gt;Meanwhile, I have generated my own implemention of the compact ?ormqr routine using Claude Code.&amp;nbsp;The code can be found here:&amp;nbsp;&lt;A href="https://github.com/ivan-pi/cqr" target="_blank"&gt;https://github.com/ivan-pi/cqr&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;I ran a benchmark on Sapphire Rapids for a batch of 10000 matrices across different sizes obtaining the following results:&lt;/P&gt;&lt;LI-CODE lang="none"&gt;~/cqr&amp;gt; ./build/bench_qr_compact 10000 3
QR solve throughput: compact batched (mkl_dgeqrf_compact -&amp;gt; cqr_mkl_dormqr_compact -&amp;gt; mkl_dtrsm_compact)
            vs per-matrix (LAPACKE_dgeqrf -&amp;gt; LAPACKE_dormqr -&amp;gt; cblas_dtrsm)
matrices=10000  reps=3  simdlen=8 (AVX512)  OpenMP threads=1

   n |  batched (s)  Mmat/s | unbatched (s) Mmat/s | speedup |  max fwd err
-----+----------------------+----------------------+---------+-------------
  10 |       0.0017    5.76 |       0.0167    0.60 |   9.60x | 1.78e-15 (rtol 2.2e-13)
  20 |       0.0066    1.52 |       0.0409    0.24 |   6.22x | 2.44e-15 (rtol 4.4e-13)
  30 |       0.0194    0.52 |       0.0647    0.15 |   3.34x | 3.11e-15 (rtol 6.7e-13)
  40 |       0.0488    0.20 |       0.0980    0.10 |   2.01x | 3.55e-15 (rtol 8.9e-13)
  50 |       0.0975    0.10 |       0.1838    0.05 |   1.88x | 3.33e-15 (rtol 1.1e-12)
  60 |       0.1712    0.06 |       0.2544    0.04 |   1.49x | 4.44e-15 (rtol 1.3e-12)
  80 |       0.4141    0.02 |       0.4821    0.02 |   1.16x | 5.55e-15 (rtol 1.8e-12)
 100 |       0.8086    0.01 |       0.9542    0.01 |   1.18x | 4.55e-15 (rtol 2.2e-12)
-----+----------------------+----------------------+---------+-------------
geometric-mean speedup (batched vs unbatched) across sizes: 2.50x&lt;/LI-CODE&gt;&lt;P&gt;To get an impression of the relative costs of dgeqrf_compact, dormqr_compact and dtrsm_compact, versus the non-compact variants, I have sampled the execution of the benchmark with perf (sampling at 999 Hz and last branch records for the callgraph). The generated flamegraph is shown below; the compact routines are shaded in pink:&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2026-07-02 at 22.29.42.png" style="width: 999px;"&gt;&lt;img src="https://community.intel.com/t5/image/serverpage/image-id/73271i6A59512C47F40B52/image-size/large?v=v2&amp;amp;px=999&amp;amp;whitelist-exif-data=Orientation%2CResolution%2COriginalDefaultFinalSize%2CCopyright" role="button" title="Screenshot 2026-07-02 at 22.29.42.png" alt="Screenshot 2026-07-02 at 22.29.42.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The compact dormqr routine is a small fraction of the total samples. The non-compact version (LAPACKE_dormqr) accounted for 9.47 % of the samples, compared to 0.56 % for the compact version.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;It is nice to see that the compact/batched approach pays off.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 02 Jul 2026 20:38:15 GMT</pubDate>
    <dc:creator>ivanp</dc:creator>
    <dc:date>2026-07-02T20:38:15Z</dc:date>
    <item>
      <title>Missing dormqr equivalent in MKL Compact API for QR-based Batch Solve</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Missing-dormqr-equivalent-in-MKL-Compact-API-for-QR-based-Batch/m-p/1733627#M37499</link>
      <description>&lt;P&gt;I would like to solve a batch of (square) linear systems using the compact/interleaved QR factorization routine, mkl_?geqrf_compact. However, I am struggling to find the documented "compact" way to complete the linear system solve AX=B using the QR factorization. The matrices I'm interested in have a strange structure, meaning that the non-pivoting LU factorization is not applicable.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;In standard LAPACK, I would use dormqr to compute Q^T B&amp;nbsp;and then&amp;nbsp;dtrsm for the back-substitution R X = (Q^T B).&lt;BR /&gt;&lt;BR /&gt;Additionally, are there any technical white papers or articles (for instance, in Intel Parallel Universe Magazine) that provide a deep dive into the Compact/Interleaved solver suite?&lt;BR /&gt;&lt;BR /&gt;Thank in advance for any advice.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jan 2026 10:53:25 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Missing-dormqr-equivalent-in-MKL-Compact-API-for-QR-based-Batch/m-p/1733627#M37499</guid>
      <dc:creator>ivanp</dc:creator>
      <dc:date>2026-01-15T10:53:25Z</dc:date>
    </item>
    <item>
      <title>Re: Missing dormqr equivalent in MKL Compact API for QR-based Batch Solve</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Missing-dormqr-equivalent-in-MKL-Compact-API-for-QR-based-Batch/m-p/1744071#M37550</link>
      <description>&lt;P&gt;Is there any chance this could be part of the oneMKL 2026.0 release?&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Essentially, what I'd need is similar to the ArmPL function,&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;A href="https://developer.arm.com/documentation/101004/2601/Interleave-batch-functions/armpl-dormqr-interleave-batch?lang=en" target="_self"&gt;armpl_dormqr_interleave_batch&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;or in MKL API, this would be&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;mkl_?ormqr_compact&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 12 Apr 2026 10:09:15 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Missing-dormqr-equivalent-in-MKL-Compact-API-for-QR-based-Batch/m-p/1744071#M37550</guid>
      <dc:creator>ivanp</dc:creator>
      <dc:date>2026-04-12T10:09:15Z</dc:date>
    </item>
    <item>
      <title>Re: Missing dormqr equivalent in MKL Compact API for QR-based Batch Solve</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Missing-dormqr-equivalent-in-MKL-Compact-API-for-QR-based-Batch/m-p/1745324#M37552</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.intel.com/t5/user/viewprofilepage/user-id/253075"&gt;@ivanp&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for submitting this request. We’ve tracked this request in our internal systems so it can be reviewed as part of our regular planning process.&amp;nbsp; Given other higher‑priority items, this feature has not been planned for near-term implementation yet.&lt;/P&gt;
&lt;P&gt;In the meantime, if you have a Priority Support account, you may also submit questions through our Priority Support channel at &lt;A href="https://supporttickets.intel.com/" target="_blank" rel="noopener"&gt;https://supporttickets.intel.com/&lt;/A&gt; for faster response on technical issues and product-related inquiries.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt;Chao Y.&lt;/P&gt;
&lt;P&gt;Intel MKL Support&lt;/P&gt;</description>
      <pubDate>Wed, 22 Apr 2026 08:55:21 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Missing-dormqr-equivalent-in-MKL-Compact-API-for-QR-based-Batch/m-p/1745324#M37552</guid>
      <dc:creator>Chao_Y_Intel</dc:creator>
      <dc:date>2026-04-22T08:55:21Z</dc:date>
    </item>
    <item>
      <title>Re: Missing dormqr equivalent in MKL Compact API for QR-based Batch Solve</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Missing-dormqr-equivalent-in-MKL-Compact-API-for-QR-based-Batch/m-p/1752979#M37618</link>
      <description>&lt;P&gt;Meanwhile, I have generated my own implemention of the compact ?ormqr routine using Claude Code.&amp;nbsp;The code can be found here:&amp;nbsp;&lt;A href="https://github.com/ivan-pi/cqr" target="_blank"&gt;https://github.com/ivan-pi/cqr&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;I ran a benchmark on Sapphire Rapids for a batch of 10000 matrices across different sizes obtaining the following results:&lt;/P&gt;&lt;LI-CODE lang="none"&gt;~/cqr&amp;gt; ./build/bench_qr_compact 10000 3
QR solve throughput: compact batched (mkl_dgeqrf_compact -&amp;gt; cqr_mkl_dormqr_compact -&amp;gt; mkl_dtrsm_compact)
            vs per-matrix (LAPACKE_dgeqrf -&amp;gt; LAPACKE_dormqr -&amp;gt; cblas_dtrsm)
matrices=10000  reps=3  simdlen=8 (AVX512)  OpenMP threads=1

   n |  batched (s)  Mmat/s | unbatched (s) Mmat/s | speedup |  max fwd err
-----+----------------------+----------------------+---------+-------------
  10 |       0.0017    5.76 |       0.0167    0.60 |   9.60x | 1.78e-15 (rtol 2.2e-13)
  20 |       0.0066    1.52 |       0.0409    0.24 |   6.22x | 2.44e-15 (rtol 4.4e-13)
  30 |       0.0194    0.52 |       0.0647    0.15 |   3.34x | 3.11e-15 (rtol 6.7e-13)
  40 |       0.0488    0.20 |       0.0980    0.10 |   2.01x | 3.55e-15 (rtol 8.9e-13)
  50 |       0.0975    0.10 |       0.1838    0.05 |   1.88x | 3.33e-15 (rtol 1.1e-12)
  60 |       0.1712    0.06 |       0.2544    0.04 |   1.49x | 4.44e-15 (rtol 1.3e-12)
  80 |       0.4141    0.02 |       0.4821    0.02 |   1.16x | 5.55e-15 (rtol 1.8e-12)
 100 |       0.8086    0.01 |       0.9542    0.01 |   1.18x | 4.55e-15 (rtol 2.2e-12)
-----+----------------------+----------------------+---------+-------------
geometric-mean speedup (batched vs unbatched) across sizes: 2.50x&lt;/LI-CODE&gt;&lt;P&gt;To get an impression of the relative costs of dgeqrf_compact, dormqr_compact and dtrsm_compact, versus the non-compact variants, I have sampled the execution of the benchmark with perf (sampling at 999 Hz and last branch records for the callgraph). The generated flamegraph is shown below; the compact routines are shaded in pink:&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2026-07-02 at 22.29.42.png" style="width: 999px;"&gt;&lt;img src="https://community.intel.com/t5/image/serverpage/image-id/73271i6A59512C47F40B52/image-size/large?v=v2&amp;amp;px=999&amp;amp;whitelist-exif-data=Orientation%2CResolution%2COriginalDefaultFinalSize%2CCopyright" role="button" title="Screenshot 2026-07-02 at 22.29.42.png" alt="Screenshot 2026-07-02 at 22.29.42.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The compact dormqr routine is a small fraction of the total samples. The non-compact version (LAPACKE_dormqr) accounted for 9.47 % of the samples, compared to 0.56 % for the compact version.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;It is nice to see that the compact/batched approach pays off.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jul 2026 20:38:15 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Missing-dormqr-equivalent-in-MKL-Compact-API-for-QR-based-Batch/m-p/1752979#M37618</guid>
      <dc:creator>ivanp</dc:creator>
      <dc:date>2026-07-02T20:38:15Z</dc:date>
    </item>
    <item>
      <title>Re: Missing dormqr equivalent in MKL Compact API for QR-based Batch Solve</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Missing-dormqr-equivalent-in-MKL-Compact-API-for-QR-based-Batch/m-p/1754192#M37633</link>
      <description>&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;P&gt;As far as I know, ?geqrf_compact only provides the QR factorization. There isn't a documented compact equivalent of ?ormqr + ?trsm to complete the solve. In most cases, you'll need to use the standard LAPACK routines after factorization. Unfortunately, detailed documentation on the compact/interleaved APIs is also quite limited beyond the MKL reference manual.&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 17 Jul 2026 10:25:35 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Missing-dormqr-equivalent-in-MKL-Compact-API-for-QR-based-Batch/m-p/1754192#M37633</guid>
      <dc:creator>william1234</dc:creator>
      <dc:date>2026-07-17T10:25:35Z</dc:date>
    </item>
    <item>
      <title>Re: Missing dormqr equivalent in MKL Compact API for QR-based Batch Solve</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Missing-dormqr-equivalent-in-MKL-Compact-API-for-QR-based-Batch/m-p/1754210#M37634</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.intel.com/t5/user/viewprofilepage/user-id/488792"&gt;@william1234&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://www.intel.com/content/www/us/en/docs/onemkl/developer-reference-c/2025-2/mkl-trsm-compact.html" target="_self"&gt;mkl_?trsm_compact&lt;/A&gt; is available in Intel MKL, but compact ?ormqr is indeed missing as discussed above.&amp;nbsp;The documentation was sufficient for my needs. Most of the parameters match the the LAPACK routines, it is just the layout that is different (arrays contiguous along the batch direction) and the ?gepack/?geunpack helper functions that one has to learn to use.&amp;nbsp;My next wish would be to have compact ?syrk; that would be useful in the context of a block Cholesky factorization.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I found some useful information about the batched approach here: &lt;A href="https://icl.utk.edu/bblas/sc24/" target="_blank"&gt;https://icl.utk.edu/bblas/&lt;/A&gt;.&lt;BR /&gt;A presentation by Sarah Knepper (Intel) from a SC24 workshop is also linked therein:&amp;nbsp;&lt;A href="https://icl.utk.edu/bblas/sc24/files/3-EvolutionOfBatchedLinearAlgebraInOneMKL.pdf" target="_blank"&gt;https://icl.utk.edu/bblas/sc24/files/3-EvolutionOfBatchedLinearAlgebraInOneMKL.pdf&lt;/A&gt;&amp;nbsp;(PDF, 316 KB).&lt;BR /&gt;&lt;BR /&gt;Pieter Pas from KU Leuven has created a C++ package for batched operations on small matrices:&amp;nbsp;&lt;A href="https://github.com/tttapa/batmat" target="_blank"&gt;https://github.com/tttapa/batmat&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Ivan&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jul 2026 13:04:52 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Missing-dormqr-equivalent-in-MKL-Compact-API-for-QR-based-Batch/m-p/1754210#M37634</guid>
      <dc:creator>ivanp</dc:creator>
      <dc:date>2026-07-17T13:04:52Z</dc:date>
    </item>
  </channel>
</rss>

