Commit Graph

10519 Commits

Author SHA1 Message Date
hmeiland b8949d1663 U74 target: build for the full JH7110 ISA (add Zba/Zbb)
The StarFive JH7110's U74 cores implement rv64imafdc_..._zba_zbb, so the U74
target now compiles with -march=rv64imafdc_zba_zbb. The generic RISCV64_GENERIC
target stays at bare rv64imafdc for portability across unknown RV64GC cores.

Measured on the VisionFive 2 (GCC 13.3, -mtune=sifive-u74 held constant): GCC
emits Zba shift-add instructions in the packing routines, but DGEMM is unchanged
-- the 4x4 kernel holds 1.533 GF either way and packing 1.74 vs 1.75 GB/s. The
4x4 micro-kernel is FMA-bound (fused fmadd.d with immediate-offset loads) and
packing is LPDDR4-bandwidth-bound, so integer address generation is not on the
critical path. The flag is nonetheless the correct -march for the silicon, is
free, and can only help address-gen-bound code elsewhere in the library. The
remaining GEMM headroom on the U74 is microarchitectural scheduling (a
hand-written assembly micro-kernel), not the ISA.
2026-07-09 20:21:40 +02:00
hmeiland a3620c264a Add U74 target with a 4x4 register-tiled GEMM kernel
The SiFive U74 (RV64GC; e.g. StarFive JH7110 / VisionFive 2) is a scalar,
in-order core with no RVV, so today it falls back to RISCV64_GENERIC whose
S/D GEMM uses the generic 2x2 C micro-kernel.

Per the U74 Core Complex Manual (Table 169) fmadd.d has a 7-cycle latency
at repeat rate 1 (fully pipelined). A 2x2 tile exposes only 4 independent
accumulator chains -- fewer than the FMA latency -- so the FP pipe stalls
on the accumulator dependency, and the 1:1 load:FMA ratio saturates the
single load/store pipe ("only one outstanding line fill", manual 8.2).

This adds a portable 4x4 GEMM micro-kernel and a dedicated U74 target:

- kernel/generic/gemmkernel_4x4.c: 16-accumulator 4x4 register tile. 16
  independent chains exceed the 7-cycle latency, and the load:FMA ratio
  drops to 1:2. 16 acc + 4 A + 4 B fit RV64G's 32 FP registers without
  spilling. Full 4/2/1 edge handling in both M and N.

- U74 target wiring: getarch.c (FORCE_U74, 32 KiB/64 B L1D, 2 MiB L2),
  param.h (S/D UNROLL 4/4; complex stays 2/2), kernel/riscv64/KERNEL.U74
  (S/D GEMM -> gemmkernel_4x4 + gemm_[nt]copy_4; S/D TRMM -> existing
  trmmkernel_4x4), Makefile.prebuild + Makefile.riscv64 (-mtune=sifive-u74),
  TargetList.txt, cpuid_riscv64.c.

The 4x4 kernel was verified numerically against a naive reference GEMM,
driven through the real gemm_tcopy_4 / gemm_ncopy_4 packing routines,
across 27,436 M/N/K x alpha combinations covering every 4/2/1 tail case:
worst absolute error 0.

Build with: make TARGET=U74
2026-07-09 14:00:16 +02:00
Martin Kroeker 7c991951a5
Merge pull request #5899 from mpwaser/fix/utest-ext-ctest
Fix CTest command for openblas_utest_ext
2026-07-09 11:12:58 +02:00
mpwaser 48c927bd1f Fix CTest command for openblas_utest_ext 2026-07-09 09:50:42 +02:00
Martin Kroeker e7b4517435
Merge pull request #5564 from vtjnash/jn/build-exe
Add $(EXE) suffix to executables in Makefiles
2026-07-08 20:50:11 +02:00
Martin Kroeker 788d544f3a
Merge pull request #5895 from moluopro/develop
RISC-V: Add TRSM RVV Kernels for ZVL Targets
2026-07-08 18:59:13 +02:00
Martin Kroeker 8af8d8f4b6
Merge branch 'develop' into jn/build-exe 2026-07-08 16:39:07 +02:00
Martin Kroeker baa253650a
Merge pull request #5872 from jschueller/tcap
Add missing thread caps
2026-07-08 13:58:38 +02:00
moluopro 0e163c9db2 kernel/riscv64: enable RVV TRSM for ZVL256B 2026-07-08 19:42:26 +08:00
moluopro a8b8136114 kernel/riscv64: enable RVV TRSM for ZVL128B 2026-07-08 19:42:17 +08:00
moluopro 0723136260 kernel/riscv64: add RVV RT TRSM kernel 2026-07-08 19:42:09 +08:00
moluopro e4e3ad2430 kernel/riscv64: add RVV RN TRSM kernel 2026-07-08 19:41:58 +08:00
moluopro 945f4352d3 kernel/riscv64: add RVV LT TRSM kernel 2026-07-08 19:41:49 +08:00
moluopro 5282a38239 kernel/riscv64: add RVV LN TRSM kernel 2026-07-08 19:41:42 +08:00
Martin Kroeker 34f66e5004
Merge pull request #5894 from martin-frbg/getrf_tsan
Change atomic semantics in GETRF to acquire/release to fix tsan warnings
2026-07-08 08:44:14 +02:00
Martin Kroeker 57da6f5902
Change atomic semanrics to acquire/release to fix tsan warnings 2026-07-07 21:38:42 +02:00
Martin Kroeker 71e999bc9a
Merge pull request #5891 from moluopro/fix/ci-badge-docs
Update README and CI job matrix documentation
2026-07-07 18:21:26 +02:00
Martin Kroeker 45199ce655
Merge pull request #5892 from moluopro/develop
Enable RVV ROTM for RISC-V ZVL Targets
2026-07-07 16:59:25 +02:00
Martin Kroeker 80d7922240
Merge pull request #5893 from martin-frbg/lapack1318
Fix  LAPACKE_?lacpy_work corrupting data in row-major mode  (Reference-LAPACK PR 1318)
2026-07-07 15:03:56 +02:00
Martin Kroeker 2b11a16f56
Fix row-major copy corrupting the other triangle (Reference-LAPACK PR 1318) 2026-07-07 10:55:25 +02:00
moluopro 09fd1da6fa kernel/riscv64: enable RVV ROTM for ZVL256B
Use the RVV ROTM kernel for single and double precision ROTM on the RISCV64_ZVL256B target.
2026-07-07 15:20:26 +08:00
moluopro a11b444d67 kernel/riscv64: enable RVV ROTM for ZVL128B
Use the RVV ROTM kernel for single and double precision ROTM on the RISCV64_ZVL128B target.
2026-07-07 15:20:26 +08:00
moluopro 395f8b347f fix(riscv64): keep signed strides in RVV ROTM
The general-stride ROTM path already computes kx/ky with the BLAS negative-increment starting offset. Converting negative increments to positive strides and moving dx/dy again double-adjusted the address and could access the wrong elements. Keep the signed byte strides for RVV strided loads and stores.
2026-07-07 15:20:17 +08:00
moluopro f82cf88caa fix(riscv64): handle zero-stride ROTM in RVV kernel
ROTM has loop-carried dependencies when incx or incy is zero because the same element is updated repeatedly across iterations. The RVV strided load/store path would compute lanes from the same old value and write them back in parallel, producing results that do not match BLAS ROTM semantics. Use a scalar path for zero-stride cases.
2026-07-07 15:20:06 +08:00
Martin Kroeker de54968e16
Merge pull request #5890 from martin-frbg/fixup5843
Apply the NEON S/DOMATCOPY kernels from PR 5843 to all arm64 targets
2026-07-07 00:47:11 +02:00
moluopro 27b0d441ad ci: skip Azure pipeline for docs-only changes
Add push and pull request path filters so docs-only changes do not trigger the Azure build matrix.
2026-07-07 00:15:30 +08:00
moluopro 1b538d7fd1 ci: skip FreeBSD workflow for docs-only changes
Add path filters so README and docs-only pull requests do not start the FreeBSD GitHub Actions jobs.
2026-07-07 00:15:30 +08:00
moluopro d560f6d74f docs: fix README supported OS references
Fix broken supported OS links for Windows, Android, and Cortex-M, and update the FreeBSD support note to mention its basic GitHub Actions coverage.
2026-07-06 23:50:31 +08:00
moluopro a0febbbc8d docs: update CI job matrix
Replace retired Cirrus CI entries with the corresponding GitHub Actions jobs for Apple M1, Neoverse N1, Graviton3, and FreeBSD runners.
2026-07-06 23:21:00 +08:00
moluopro 2497041827 docs: refresh README CI badges
Replace the retired Cirrus CI badge with the current GitHub Actions badge, label the Azure Pipelines badge, and remove stale public OSUOSL badges whose job pages no longer resolve.
2026-07-06 23:21:00 +08:00
Martin Kroeker 6468bcbdad
Merge pull request #5889 from moluopro/develop
ARM64 SME: fix zero-scalar handling and clean up direct kernels
2026-07-06 16:50:48 +02:00
Martin Kroeker c61f95c8d3
Merge pull request #5888 from martin-frbg/lapack1297
Relax eigenvalue consistency criterion in testsuite (Reference-LAPACK PR 1297)
2026-07-06 16:34:53 +02:00
Martin Kroeker a2f9fc83df
Merge pull request #5885 from martin-frbg/lapack1317
Increase deflation tolerance in ?LAED to match recent changes in ?SLASD  (Reference-LAPACK PR 1317)
2026-07-06 13:09:16 +02:00
Martin Kroeker a5d477f195
fix omatcopy filenames 2026-07-06 12:28:02 +02:00
Martin Kroeker 36365a602e
Make the OMATCOPY kernels from 5843 universally available 2026-07-06 11:49:27 +02:00
moluopro 130102e661 Clean up SSYR2K SME direct warnings
Mark read-only transpose inputs const and limit sve_cntw and ldb definitions to the variants that use them.
2026-07-06 16:00:21 +08:00
moluopro 3781e2c15d Clean up SSYRK SME direct warnings
Mark the read-only B input const and limit sve_cntw and ldb definitions to the variants that use them.
2026-07-06 15:59:53 +08:00
moluopro edd8ab196d Clean up SSYMM SME preprocessing warnings
Use const source pointers in the symmetric preprocessing helpers and compile only the LU or LL helper needed by each object variant.
2026-07-06 15:59:25 +08:00
Martin Kroeker aa8b19de74
Relax eigenvalue consistency test (Reference-LAPACK PR 1297) 2026-07-06 09:43:58 +02:00
moluopro 8cde36c9b8 Use integer round-up in ARM64 SME direct kernels
The padded SME dimensions are integer quantities, so compute them with integer arithmetic and drop the now-unused math.h include.
2026-07-06 15:33:29 +08:00
moluopro d49cd021dd Handle zero alpha/beta in SSYR2K SME direct kernel
Avoid loading C when beta is zero, and skip A/B preprocessing for alpha == 0 or K == 0 by reusing the triangular direct kernel with k = 0.
2026-07-06 15:30:42 +08:00
moluopro 9925b29db5 Handle zero alpha/beta in SSYRK SME direct kernel
Avoid loading C when beta is zero, and skip A preprocessing for alpha == 0 or K == 0 by reusing the triangular direct kernel with k = 0.
2026-07-06 15:30:37 +08:00
moluopro 35a841fd49 Handle zero alpha in SSYMM SME direct kernel
When alpha is zero, avoid preprocessing the symmetric matrix and reuse the SGEMM alpha/beta direct kernel with k = 0 for the beta-only update.
2026-07-06 15:30:27 +08:00
moluopro ab27636deb Handle zero alpha/beta in SGEMM SME direct kernel
Avoid loading C when beta is zero; ZA has already been initialized to zero.

For alpha == 0 or K == 0, skip A preprocessing and reuse the direct kernel with k = 0 to perform only the beta update.
2026-07-06 15:30:22 +08:00
Martin Kroeker 882526a408
Merge pull request #5886 from martin-frbg/lapack1290
Avoid intermediate overflow in ?LARFGP (Reference-LAPACK PR 1290)
2026-07-06 08:59:14 +02:00
Martin Kroeker 170da5f679
Merge pull request #5883 from martin-frbg/lapack1300
Use QR  for bidiagonal SVD with vectors in ?BDSDC (Reference-LAPACK PR 1300)
2026-07-06 07:30:06 +02:00
Martin Kroeker ac394175e4
Merge pull request #5887 from martin-frbg/disable_cirrusci
CI: disable the remaining Cirrus jobs now that the service is gone
2026-07-06 00:39:32 +02:00
Martin Kroeker cc02866ef1
disable the remaining jobs now that Cirrus is gone 2026-07-06 00:38:31 +02:00
Martin Kroeker 022b1c6a03
Merge branch 'OpenMathLib:develop' into lapack1290 2026-07-05 22:05:59 +02:00
Martin Kroeker 6cd5516da2
Merge branch 'OpenMathLib:develop' into lapack1317 2026-07-05 22:05:40 +02:00