Skip to content

OpenBLAS RISC-V verification suite + TRSM VLEN-fix sweep#18

Merged
hugomeiland merged 1 commit into
opensolvers:mainfrom
hmeiland:openblas-trsm-verify
Jul 19, 2026
Merged

OpenBLAS RISC-V verification suite + TRSM VLEN-fix sweep#18
hugomeiland merged 1 commit into
opensolvers:mainfrom
hmeiland:openblas-trsm-verify

Conversation

@hmeiland

Copy link
Copy Markdown
Contributor

OpenBLAS RISC-V verification suite + TRSM VLEN-fix sweep

Consolidates the BLAS verification harnesses under a single OpenBLAS/
directory (renamed from dgemm/, since it verifies the whole OpenBLAS RISC-V
backend, not just DGEMM) and adds the TRSM correctness sweep used to validate a
real upstream kernel bug.

What changed

  • dgemm/OpenBLAS/ (rename, history preserved) — now the OpenBLAS
    RISC-V verification suite: bench_dgemm.c (perf), difftest.c (level-1/2/3
    differential correctness), and the new verify_ctrsm.c.
  • OpenBLAS/verify_ctrsm.c — full-parameter TRSM correctness sweep
    ({Left,Right} × {Upper,Lower} × {NoTrans,Trans,ConjTrans} × {NonUnit,Unit} ×
    size grid), recomputes op(A)·X and checks the max residual. Compile-verified
    on the X60: CTRSM 2400 cases, 0 fails, worst_resid=2.99e-07.
  • OpenBLAS/README.md — retitled, documents a second RISC-V kernel bug: the
    RVV _rvv_v1 TRSM kernels are not VLEN-agnostic (tile packed-A by runtime
    VSETVL_MAX=16 while GEMM packs by compile-time GEMM_UNROLL_M, diverging
    when UNROLL_M=8 on ZVL128B). Includes the 408/1600 → 8000/0 correctness
    table, the fix summary, and a no-regression perf table with the
    broken-baseline caveat. Tracks riscv64: make RVV TRSM (_rvv_v1) kernels VLEN-agnostic OpenMathLib/OpenBLAS#5928.
  • Cross-references to ../dgemm fixed in root / numpy / hpl READMEs.

Verification

  • verify_ctrsm compiles and passes 0 fails on the fixed ZVL128B build.
  • The documented fix passes 8000/0 on both ZVL128B (UNROLL_M=8) and
    ZVL256B (UNROLL_M=16), i.e. genuinely VLEN-agnostic.
  • No links to the old dgemm/ path remain.

…EN-fix sweep + perf

Rename dgemm/ -> OpenBLAS/ (it verifies the whole OpenBLAS RISC-V backend, not
just DGEMM). Add verify_ctrsm.c, the full-parameter TRSM correctness sweep used
to validate the VLEN-agnostic _rvv_v1 fix (OpenMathLib/OpenBLAS#5928):
408/1600 -> 8000/0 on ZVL128B, also 8000/0 on ZVL256B. README gains a TRSM
section (root cause, correctness table, fix summary, no-regression perf table
with broken-baseline caveat). Fix ../dgemm links in root/numpy/hpl READMEs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants