OpenBLAS/kernel
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
..
alpha Further rearranged the rotm kernel for the different architectures. 2025-01-22 11:41:12 +08:00
arm rename arm32 sgemm_kernel to indicate neon support 2026-05-05 23:09:52 +03:00
arm64 Merge pull request #5890 from martin-frbg/fixup5843 2026-07-07 00:47:11 +02:00
csky Further rearranged the rotm kernel for the different architectures. 2025-01-22 11:41:12 +08:00
e2k Further rearranged the rotm kernel for the different architectures. 2025-01-22 11:41:12 +08:00
generic Add U74 target with a 4x4 register-tiled GEMM kernel 2026-07-09 14:00:16 +02:00
ia64 Further rearranged the rotm kernel for the different architectures. 2025-01-22 11:41:12 +08:00
loongarch64 optimize sdot lsx kernel 2026-06-08 14:26:03 +08:00
mips Remove redundant C implemetations from MIPS directories 2026-04-08 13:59:10 +08:00
mips64 Fix dsdot precision for arm/dot.c 2026-04-09 18:11:47 +08:00
power Merge pull request #5828 from amritahs-ibm/fix_dcbt_constraints 2026-06-15 11:22:10 +02:00
riscv64 Add U74 target with a 4x4 register-tiled GEMM kernel 2026-07-09 14:00:16 +02:00
simd Add WASM SIMD widening path for DSDOT 2026-03-19 14:16:18 +09:00
sparc Use the generic C kernel for DNRM2 2026-01-11 21:58:31 +01:00
wasm Add WASM128_GENERIC STRSM and DTRSM kernels 2026-04-16 17:52:37 +09:00
x86 override CDOT and ZDOT with the generic C kernel 2025-06-17 22:41:40 +02:00
x86_64 fix conditionals 2026-04-14 21:32:36 +02:00
zarch Add dummy2 flag handling 2025-05-25 14:47:06 -07:00
CMakeLists.txt set USE_TRMM for WASM 2026-03-15 23:07:16 +01:00
Makefile Comment out the libclang_rt.builtins kludge in preparation for removal 2026-06-05 23:06:28 +02:00
Makefile.L1 Add infrastructure for bgemv/bscal 2025-07-15 14:48:57 +01:00
Makefile.L2 Add Infrastructure for SHGEMV 2025-10-07 15:03:24 +00:00
Makefile.L3 set USE_TRMM for WASM 2026-03-15 23:07:16 +01:00
Makefile.LA Support NO_LAPACK=1 to build the lib without LAPACK functions. 2011-03-04 11:51:32 +08:00
setparam-ref.c fix C89 scoping, dynamic R for memory issues, robust zen4/5 check 2026-07-04 11:30:34 +05:30