|
563 | 563 | </span> |
564 | 564 | </a> |
565 | 565 |
|
| 566 | +</li> |
| 567 | + |
| 568 | + <li class="md-nav__item"> |
| 569 | + <a href="#risc-v" class="md-nav__link"> |
| 570 | + <span class="md-ellipsis"> |
| 571 | + |
| 572 | + RISC-V |
| 573 | + |
| 574 | + </span> |
| 575 | + </a> |
| 576 | + |
| 577 | + <nav class="md-nav" aria-label="RISC-V"> |
| 578 | + <ul class="md-nav__list"> |
| 579 | + |
| 580 | + <li class="md-nav__item"> |
| 581 | + <a href="#target-selection" class="md-nav__link"> |
| 582 | + <span class="md-ellipsis"> |
| 583 | + |
| 584 | + Target selection |
| 585 | + |
| 586 | + </span> |
| 587 | + </a> |
| 588 | + |
| 589 | +</li> |
| 590 | + |
| 591 | + <li class="md-nav__item"> |
| 592 | + <a href="#compiler-requirements-for-zvl-targets" class="md-nav__link"> |
| 593 | + <span class="md-ellipsis"> |
| 594 | + |
| 595 | + Compiler requirements for ZVL targets |
| 596 | + |
| 597 | + </span> |
| 598 | + </a> |
| 599 | + |
| 600 | +</li> |
| 601 | + |
| 602 | + </ul> |
| 603 | + </nav> |
| 604 | + |
566 | 605 | </li> |
567 | 606 |
|
568 | 607 | <li class="md-nav__item"> |
|
1090 | 1129 | </span> |
1091 | 1130 | </a> |
1092 | 1131 |
|
| 1132 | +</li> |
| 1133 | + |
| 1134 | + <li class="md-nav__item"> |
| 1135 | + <a href="#risc-v" class="md-nav__link"> |
| 1136 | + <span class="md-ellipsis"> |
| 1137 | + |
| 1138 | + RISC-V |
| 1139 | + |
| 1140 | + </span> |
| 1141 | + </a> |
| 1142 | + |
| 1143 | + <nav class="md-nav" aria-label="RISC-V"> |
| 1144 | + <ul class="md-nav__list"> |
| 1145 | + |
| 1146 | + <li class="md-nav__item"> |
| 1147 | + <a href="#target-selection" class="md-nav__link"> |
| 1148 | + <span class="md-ellipsis"> |
| 1149 | + |
| 1150 | + Target selection |
| 1151 | + |
| 1152 | + </span> |
| 1153 | + </a> |
| 1154 | + |
| 1155 | +</li> |
| 1156 | + |
| 1157 | + <li class="md-nav__item"> |
| 1158 | + <a href="#compiler-requirements-for-zvl-targets" class="md-nav__link"> |
| 1159 | + <span class="md-ellipsis"> |
| 1160 | + |
| 1161 | + Compiler requirements for ZVL targets |
| 1162 | + |
| 1163 | + </span> |
| 1164 | + </a> |
| 1165 | + |
| 1166 | +</li> |
| 1167 | + |
| 1168 | + </ul> |
| 1169 | + </nav> |
| 1170 | + |
1093 | 1171 | </li> |
1094 | 1172 |
|
1095 | 1173 | <li class="md-nav__item"> |
@@ -1810,6 +1888,71 @@ <h3 id="mips">MIPS</h3> |
1810 | 1888 |
|
1811 | 1889 | make<span class="w"> </span><span class="nv">BINARY</span><span class="o">=</span><span class="m">32</span><span class="w"> </span><span class="nv">BINARY32</span><span class="o">=</span><span class="m">1</span><span class="w"> </span><span class="nv">CC</span><span class="o">=</span><span class="nv">$MTI_TOOLCHAIN</span>-gcc<span class="w"> </span><span class="nv">AR</span><span class="o">=</span><span class="nv">$MTI_TOOLCHAIN</span>-ar<span class="w"> </span><span class="nv">FC</span><span class="o">=</span><span class="s2">"</span><span class="nv">$MTI_TOOLCHAIN</span><span class="s2">-gfortran -EL"</span><span class="w"> </span><span class="nv">RANLIB</span><span class="o">=</span><span class="nv">$MTI_TOOLCHAIN</span>-ranlib<span class="w"> </span><span class="nv">HOSTCC</span><span class="o">=</span>gcc<span class="w"> </span><span class="nv">CFLAGS</span><span class="o">=</span><span class="s2">"-EL"</span><span class="w"> </span><span class="nv">FFLAGS</span><span class="o">=</span><span class="nv">$CFLAGS</span><span class="w"> </span><span class="nv">LDFLAGS</span><span class="o">=</span><span class="nv">$CFLAGS</span><span class="w"> </span><span class="nv">TARGET</span><span class="o">=</span>P5600 |
1812 | 1890 | </code></pre></div> |
| 1891 | +<h3 id="risc-v">RISC-V</h3> |
| 1892 | +<p>OpenBLAS supports several RISC-V targets. Target selection determines whether |
| 1893 | +the resulting build is vectorized.</p> |
| 1894 | +<h4 id="target-selection">Target selection</h4> |
| 1895 | +<table> |
| 1896 | +<thead> |
| 1897 | +<tr> |
| 1898 | +<th>Target</th> |
| 1899 | +<th>Vectorization</th> |
| 1900 | +<th>Use when</th> |
| 1901 | +</tr> |
| 1902 | +</thead> |
| 1903 | +<tbody> |
| 1904 | +<tr> |
| 1905 | +<td><code>RISCV64_GENERIC</code></td> |
| 1906 | +<td>None — scalar reference path</td> |
| 1907 | +<td>Non-vector cores, or as a baseline reference build</td> |
| 1908 | +</tr> |
| 1909 | +<tr> |
| 1910 | +<td><code>RISCV64_ZVL128B</code></td> |
| 1911 | +<td>RVV 1.0, VLEN >= 128 bits</td> |
| 1912 | +<td>Generic RVV-1.0 hardware with 128-bit vector registers</td> |
| 1913 | +</tr> |
| 1914 | +<tr> |
| 1915 | +<td><code>RISCV64_ZVL256B</code></td> |
| 1916 | +<td>RVV 1.0, VLEN >= 256 bits</td> |
| 1917 | +<td>Generic RVV-1.0 hardware with 256-bit vector registers</td> |
| 1918 | +</tr> |
| 1919 | +<tr> |
| 1920 | +<td><code>C910V</code></td> |
| 1921 | +<td>RVV 0.7.1 (legacy)</td> |
| 1922 | +<td>T-Head C910 (Allwinner D1, etc.)</td> |
| 1923 | +</tr> |
| 1924 | +<tr> |
| 1925 | +<td><code>x280</code></td> |
| 1926 | +<td>RVV 1.0, SiFive-tuned</td> |
| 1927 | +<td>SiFive x280 cores</td> |
| 1928 | +</tr> |
| 1929 | +</tbody> |
| 1930 | +</table> |
| 1931 | +<p>As with the <code>GENERIC</code> and <code>ARCH_GENERIC</code> targets on other architectures, |
| 1932 | +<code>RISCV64_GENERIC</code> maps all BLAS operations to the non-vectorized plain-C |
| 1933 | +reference path. On RISC-V specifically, <code>Makefile.riscv64</code> also appends a |
| 1934 | +scalar <code>-march</code> override for this target that takes precedence over any |
| 1935 | +user-supplied <code>-march=rv64gcv</code> flag, so passing the V extension on the |
| 1936 | +command line will not produce a vectorized build under this target.</p> |
| 1937 | +<p>For RVV 1.0 vectorized builds, use <code>RISCV64_ZVL128B</code> or <code>RISCV64_ZVL256B</code>. |
| 1938 | +These targets route all three BLAS levels including DGEMM to the |
| 1939 | +<code>_rvv.c</code> kernel set introduced in 2022; see |
| 1940 | +<a href="https://github.com/OpenMathLib/OpenBLAS/issues/3808">issue #3808</a> for the |
| 1941 | +design rationale and the <code>_vector.c</code> (legacy RVV 0.7) / <code>_rvv.c</code> (RVV 1.0) |
| 1942 | +codebase separation.</p> |
| 1943 | +<h4 id="compiler-requirements-for-zvl-targets">Compiler requirements for ZVL targets</h4> |
| 1944 | +<p>GCC 14 or later is required on current OpenBLAS releases when building the |
| 1945 | +<code>RISCV64_ZVL128B</code> or <code>RISCV64_ZVL256B</code> targets. GCC 13 does not implement |
| 1946 | +the segmented load/store intrinsics (<code>__riscv_vsseg*</code>) used by the |
| 1947 | +<code>_rvv.c</code> kernels; under GCC 13 the build still completes and produces a |
| 1948 | +library, but the affected routines fall back to scalar code paths. |
| 1949 | +Functional tests will pass on the resulting library; only |
| 1950 | +disassembly-level verification detects the regression.</p> |
| 1951 | +<p>For a correct <code>RISCV64_ZVL128B</code> build on OpenBLAS 0.3.33,</p> |
| 1952 | +<div class="highlight"><pre><span></span><code>riscv64-linux-gnu-objdump<span class="w"> </span>-d<span class="w"> </span>libopenblas*.a<span class="w"> </span><span class="p">|</span><span class="w"> </span><span class="se">\</span> |
| 1953 | +<span class="w"> </span>grep<span class="w"> </span>-c<span class="w"> </span><span class="s1">'vle64\|vfmacc\|vsetvli\|vlse64\|vfmul\|vfadd\|vfredosum'</span> |
| 1954 | +</code></pre></div> |
| 1955 | +<p>returns approximately 12,000-14,000 (GCC 14: ~12,691; GCC 15: ~14,355).</p> |
1813 | 1956 | <h3 id="freebsd_1">FreeBSD</h3> |
1814 | 1957 | <p>You will need to install the following tools from the FreeBSD ports tree:</p> |
1815 | 1958 | <ul> |
@@ -1888,7 +2031,7 @@ <h3 id="cortex-m">Cortex-M</h3> |
1888 | 2031 | <span class="md-icon" title="Last update"> |
1889 | 2032 | <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M21 13.1c-.1 0-.3.1-.4.2l-1 1 2.1 2.1 1-1c.2-.2.2-.6 0-.8l-1.3-1.3c-.1-.1-.2-.2-.4-.2m-1.9 1.8-6.1 6V23h2.1l6.1-6.1zM12.5 7v5.2l4 2.4-1 1L11 13V7zM11 21.9c-5.1-.5-9-4.8-9-9.9C2 6.5 6.5 2 12 2c5.3 0 9.6 4.1 10 9.3-.3-.1-.6-.2-1-.2s-.7.1-1 .2C19.6 7.2 16.2 4 12 4c-4.4 0-8 3.6-8 8 0 4.1 3.1 7.5 7.1 7.9l-.1.2z"/></svg> |
1890 | 2033 | </span> |
1891 | | - <span class="git-revision-date-localized-plugin git-revision-date-localized-plugin-date" title="May 1, 2026 05:18:25 UTC">May 1, 2026</span> |
| 2034 | + <span class="git-revision-date-localized-plugin git-revision-date-localized-plugin-date" title="May 24, 2026 20:10:28 UTC">May 24, 2026</span> |
1892 | 2035 | </span> |
1893 | 2036 |
|
1894 | 2037 |
|
|
0 commit comments