You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rename dgemm/ → OpenBLAS/ in links, merge verification content into the BLAS page, keep dgemm.html as a redirect stub, and update cross-links across apps and libs.
Co-authored-by: Cursor <cursoragent@cursor.com>
[`dgemm`](../scientific-libs/dgemm.html) isolates BLAS-3; [HPL](hpl.html) and [ELPA](../scientific-libs/elpa.html) probe single HPC solvers; [FFTW](../scientific-libs/fftw.html) covers the FFT half. A full DFT SCF mixes level-3 GEMM (`calbec`, subspace rotation), dense LAPACK diagonalization, latency-bound BLAS-2, MPI, **and a large FFT fraction** — so it shows both whether a buggy vector BLAS breaks a production code, and what fraction of a real run each backend swap actually moves.
9
+
[OpenBLAS verification](../scientific-libs/blas.html#verification) isolates BLAS-3; [HPL](hpl.html) and [ELPA](../scientific-libs/elpa.html) probe single HPC solvers; [FFTW](../scientific-libs/fftw.html) covers the FFT half. A full DFT SCF mixes level-3 GEMM (`calbec`, subspace rotation), dense LAPACK diagonalization, latency-bound BLAS-2, MPI, **and a large FFT fraction** — so it shows both whether a buggy vector BLAS breaks a production code, and what fraction of a real run each backend swap actually moves.
10
10
11
11
## Correctness — stock RVV `gemv_n` breaks a real DFT SCF
12
12
@@ -56,7 +56,7 @@ Same X60, patched RVV vs scalar:
56
56
57
57
| Probe | Speedup | Why |
58
58
| ----- | ------: | --- |
59
-
|[DGEMM](../scientific-libs/dgemm.html) (pure level-3) |~2.3× | all BLAS-3 |
59
+
|[OpenBLAS verification](../scientific-libs/blas.html#verification) (pure level-3) |~2.3× | all BLAS-3 |
**Toolchain:** QuantumESPRESSO 7.5 / foss-2025b (EESSI), FlexiBLAS 3.4.5, OpenBLAS 0.3.30. Patched vector backend = OpenBLAS 0.3.30 with the RISC-V `gemv_n` NaN fix backported — same build used by [DGEMM](../scientific-libs/dgemm.html), [HPL](hpl.html), and [ELPA](../scientific-libs/elpa.html).
79
+
**Toolchain:** QuantumESPRESSO 7.5 / foss-2025b (EESSI), FlexiBLAS 3.4.5, OpenBLAS 0.3.30. Patched vector backend = OpenBLAS 0.3.30 with the RISC-V `gemv_n` NaN fix backported — same build used by [OpenBLAS verification](../scientific-libs/blas.html#verification), [HPL](hpl.html), and [ELPA](../scientific-libs/elpa.html).
Copy file name to clipboardExpand all lines: scientific-libs/blas.md
+57-3Lines changed: 57 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
Improvements to **OpenBLAS 0.3.30** on RISC-V boards — built via EasyBuild, deployed through [EESSI](https://www.eessi.io/) with **FlexiBLAS** runtime swapping.
Verification microbenchmarks live in [opensolvers/benchmarks/OpenBLAS](https://github.com/opensolvers/benchmarks/tree/main/OpenBLAS) (`bench_dgemm`, `difftest`, `verify_ctrsm`). Stack probes: [NumPy](numpy.html) (`bench_blas.py`). Full repo: [opensolvers/benchmarks](https://github.com/opensolvers/benchmarks).
Build with `eb --from-pr <num> --robot` into an **EESSI-extend** user install, then `flexiblas add` / `flexiblas default` — no downstream rebuild.
25
25
26
+
## Verification {#verification}
27
+
28
+
The benchmarks repo renamed `dgemm/` → **`OpenBLAS/`** — a small suite for **BLAS performance and per-routine correctness**, used to isolate broken RVV kernels before trusting downstream apps.
29
+
30
+
| File | Purpose |
31
+
| ---- | ------- |
32
+
|[`bench_dgemm.c`](https://github.com/opensolvers/benchmarks/blob/main/OpenBLAS/bench_dgemm.c)| Times square `C = A×B` (3 reps), reports GFLOP/s, prints `C[0]`|
33
+
|[`difftest.c`](https://github.com/opensolvers/benchmarks/blob/main/OpenBLAS/difftest.c)|`dlopen`s a BLAS `.so`, runs level-1/2/3 routines, reports `sum` / NaN counts |
Fault is in **`dgemv` only** — plain `dgemm` and `dtrsm` look fine on the broken `gemv_n` build, which is why [HPL](../apps/hpl.html) and [Quantum ESPRESSO](../apps/qe.html) can fail while a GEMM micro-benchmark passes.
57
+
58
+
A second bug — RVV `_rvv_v1` TRSM kernels not VLEN-agnostic ([OpenBLAS#5928](https://github.com/OpenMathLib/OpenBLAS/pull/5928)) — is caught by `verify_ctrsm` on `ZVL128B` builds where `GEMM_UNROLL_M ≠ VSETVL_MAX`.
59
+
60
+
### Performance — `bench_dgemm`
61
+
62
+
#### Orange Pi RV2 (1 core, N=2048)
63
+
64
+
| Backend | GFLOP/s |`C[0]`|
65
+
| ------- | ------- | ------ |
66
+
| Scalar | 1.16 | 245.24 |
67
+
| Patched RVV | 2.62 | 245.24 |
68
+
69
+
**2.3×** faster, numerically identical.
70
+
71
+
#### Banana Pi F3 (cross-board)
72
+
73
+
| Backend | GFLOP/s |`C[0]`|
74
+
| ------- | ------- | ------ |
75
+
| Scalar | 1.26 | 245.24 |
76
+
| Patched RVV | 2.96 | 245.24 |
77
+
78
+
**2.35×** at 1 core. Threaded (8 cores, N=4096): **17.71 GFLOP/s** on patched RVV.
79
+
26
80
## Notes
27
81
28
82
-**U74** — performance kernel; stock OpenBLAS works but leaves FP throughput on the table.
Micro-benchmarks for **BLAS level-3 performance** and **per-routine correctness** — from [opensolvers/benchmarks/dgemm](https://github.com/opensolvers/benchmarks/tree/main/dgemm). Used to isolate the OpenBLAS 0.3.30 RVV `gemv_n` NaN bug before fixing downstream apps.
3
+
This page moved to the [BLAS overview](blas.html#verification).
4
4
5
-
See also the [BLAS overview](blas.html) for OpenBLAS packages and board context.
6
-
7
-
## Tools
8
-
9
-
| File | Purpose |
10
-
| ---- | ------- |
11
-
|[`bench_dgemm.c`](https://github.com/opensolvers/benchmarks/blob/main/dgemm/bench_dgemm.c)| Times square `C = A×B` (3 reps), reports GFLOP/s, prints `C[0]`|
12
-
|[`difftest.c`](https://github.com/opensolvers/benchmarks/blob/main/dgemm/difftest.c)|`dlopen`s a BLAS `.so`, runs level-1/2/3 routines, reports `sum` / NaN counts |
13
-
14
-
Both switch backends at runtime via FlexiBLAS or `OPENBLAS_CORETYPE` — no recompile.
15
-
16
-
```bash
17
-
gcc -O2 bench_dgemm.c -o bench_dgemm -lflexiblas
18
-
gcc -O2 difftest.c -o difftest -ldl -lm
19
-
20
-
OPENBLAS_NUM_THREADS=8 ./bench_dgemm 4096
21
-
./difftest /path/to/libopenblas.so
22
-
```
23
-
24
-
## Correctness — `difftest` (X60, RV2 & F3)
25
-
26
-
Bit-identical on [Orange Pi RV2](../boards/RV2.html) and [Banana Pi F3](../boards/F3.html):
27
-
28
-
| Backend |`dgemv` NaN |`dgemm` NaN |`dgemv` sum |
Fault is in **`dgemv` only** — plain `dgemm` looks fine on the broken build, which is why [HPL](../apps/hpl.html) and [Quantum ESPRESSO](../apps/qe.html) can fail while a GEMM micro-benchmark passes.
35
-
36
-
## Performance — `bench_dgemm`
37
-
38
-
### Orange Pi RV2 (1 core, N=2048)
39
-
40
-
| Backend | GFLOP/s |`C[0]`|
41
-
| ------- | ------- | ------ |
42
-
| Scalar | 1.16 | 245.24 |
43
-
| Patched RVV | 2.62 | 245.24 |
44
-
45
-
**2.3×** faster, numerically identical.
46
-
47
-
### Banana Pi F3 (cross-board)
48
-
49
-
| Backend | GFLOP/s |`C[0]`|
50
-
| ------- | ------- | ------ |
51
-
| Scalar | 1.26 | 245.24 |
52
-
| Patched RVV | 2.96 | 245.24 |
53
-
54
-
**2.35×** at 1 core. Threaded (8 cores, N=4096): **17.71 GFLOP/s** on patched RVV.
5
+
The benchmarks repo renamed [`dgemm/`](https://github.com/opensolvers/benchmarks/tree/main/OpenBLAS) → [`OpenBLAS/`](https://github.com/opensolvers/benchmarks/tree/main/OpenBLAS) — DGEMM microbenchmarks, differential correctness (`difftest`), and TRSM verification (`verify_ctrsm`) now live under that directory and on the BLAS page.
Copy file name to clipboardExpand all lines: scientific-libs/lapack.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
LAPACK performance and correctness probed via NumPy **`eigvalsh`** (`dsyevd`) — the LAPACK-heavy half of the [NumPy benchmark](numpy.html).
4
4
5
-
Benchmark source: [opensolvers/benchmarks/numpy](https://github.com/opensolvers/benchmarks/tree/main/numpy) (`bench_blas.py`). For DGEMM (`A @ B`) see the [NumPy](numpy.html) or [DGEMM](dgemm.html) pages.
5
+
Benchmark source: [opensolvers/benchmarks/numpy](https://github.com/opensolvers/benchmarks/tree/main/numpy) (`bench_blas.py`). For DGEMM (`A @ B`) see the [NumPy](numpy.html) or [BLAS verification](blas.html#verification) sections.
Unlike raw [DGEMM](dgemm.html), `eigvalsh` exercises BLAS-2 tridiagonalization — a correctness gate for the same `gemv_n` bug that breaks [HPL](../apps/hpl.html) and [ELPA](elpa.html).
10
+
Unlike raw [OpenBLAS verification](blas.html#verification), `eigvalsh` exercises BLAS-2 tridiagonalization — a correctness gate for the same `gemv_n` bug that breaks [HPL](../apps/hpl.html) and [ELPA](elpa.html).
11
11
12
12
```bash
13
13
module load SciPy-bundle/2025.07-gfbf-2025b
@@ -33,6 +33,6 @@ Both patched results finite. See [LAPACK](lapack.html) for the LAPACK angle.
**Stock unpatched RVV:**`eigvalsh` raises `LinAlgError: Eigenvalues did not converge`; DGEMM alone stays finite at 10.94 GFLOP/s (only `gemv` is broken — see [DGEMM difftest](dgemm.html)).
36
+
**Stock unpatched RVV:**`eigvalsh` raises `LinAlgError: Eigenvalues did not converge`; DGEMM alone stays finite at 10.94 GFLOP/s (only `gemv` is broken — see [`difftest`](blas.html#verification)).
37
37
38
38
Eigensolver speedup (~1.6×) is lower than DGEMM (~2.4–3.6×) because `eigvalsh` mixes BLAS-3 with latency-bound BLAS-2 — same pattern as [ELPA](elpa.html).
Nav config: `_config.yml` (`navigation`, `navigation_boards`, `navigation_apps`, `navigation_scientific_libs`). Rendered in `_includes/header.html`. Cayman theme requires `_layouts/default.html` override to include the header.
0 commit comments