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
..
2023-07-20 15:28:35 +01:00
2024-01-16 14:33:08 +00:00
2020-10-15 16:09:02 +08:00
2023-07-20 15:28:35 +01:00
2024-01-23 19:01:31 +03:00
2020-10-15 16:09:02 +08:00
2023-07-20 15:28:35 +01:00
2024-01-23 19:01:31 +03:00
2020-10-15 16:09:02 +08:00
2024-07-15 14:24:47 +00:00
2025-05-29 17:50:44 +08:00
2024-02-04 22:07:51 +01:00
2024-01-18 23:19:52 +03:00
2024-02-16 16:00:38 +00:00
2024-02-16 16:00:38 +00:00
2024-01-18 23:19:52 +03:00
2023-12-04 11:02:18 +00:00
2023-02-24 10:45:03 +00:00
2024-01-18 22:14:32 +03:00
2024-01-16 14:33:08 +00:00
2024-01-18 23:19:52 +03:00
2023-12-04 11:02:18 +00:00
2023-02-24 10:45:03 +00:00
2024-01-23 19:01:31 +03:00
2023-12-04 11:02:18 +00:00
2026-05-18 18:56:29 +00:00
2023-07-20 15:28:35 +01:00
2024-01-16 14:33:08 +00:00
2024-02-01 10:32:00 +00:00
2024-01-23 19:01:31 +03:00
2023-12-04 11:02:18 +00:00
2023-02-24 10:45:03 +00:00
2023-03-19 23:59:03 -07:00
2025-08-12 17:18:56 +00:00
2024-01-18 22:14:32 +03:00
2025-09-26 14:50:38 +00:00
2025-08-12 17:18:56 +00:00
2025-09-26 14:50:38 +00:00
2023-03-19 23:59:03 -07:00
2025-08-12 17:18:56 +00:00
2025-01-15 11:31:28 +08:00
2025-09-26 14:50:38 +00:00
2025-08-12 17:18:56 +00:00
2025-09-26 14:50:38 +00:00
2023-03-19 23:59:03 -07:00
2023-03-19 23:59:03 -07:00
2023-03-19 23:59:03 -07:00
2026-06-02 16:39:16 +00:00
2020-10-15 16:09:02 +08:00
2023-07-25 11:36:23 +01:00
2025-09-13 11:35:49 +08:00
2020-10-15 16:09:02 +08:00
2023-12-04 11:13:35 +00:00
2023-07-20 15:28:35 +01:00
2024-01-16 14:33:08 +00:00
2020-10-15 16:09:02 +08:00
2023-07-20 15:28:35 +01:00
2024-01-23 19:01:31 +03:00
2020-10-15 16:09:02 +08:00
2023-07-20 15:28:35 +01:00
2024-01-16 14:33:08 +00:00
2020-10-15 16:09:02 +08:00
2023-07-20 15:28:35 +01:00
2024-01-16 14:33:08 +00:00
2021-06-07 22:49:39 +00:00
2024-01-18 22:14:32 +03:00
2024-01-16 14:33:08 +00:00
2020-10-15 16:09:02 +08:00
2024-01-18 22:14:32 +03:00
2024-01-23 19:01:31 +03:00
2020-10-15 16:09:02 +08:00
2025-01-22 11:41:12 +08:00
2025-01-22 11:41:12 +08:00
2025-01-22 11:41:12 +08:00
2026-07-08 19:42:17 +08:00
2026-07-08 19:42:26 +08:00
2026-07-09 14:00:16 +02:00
2025-01-22 11:41:12 +08:00
2021-06-07 22:55:56 +00:00
2023-07-20 15:28:35 +01:00
2024-01-16 14:33:08 +00:00
2020-10-15 16:09:02 +08:00
2023-07-20 15:28:35 +01:00
2024-01-16 14:33:08 +00:00
2020-10-15 16:09:02 +08:00
2024-12-31 08:46:55 +08:00
2024-01-23 19:01:31 +03:00
2024-03-13 11:40:14 +01:00
2024-03-12 15:48:55 +01:00
2025-01-08 11:00:35 +08:00
2025-07-30 14:04:43 +00:00
2020-10-15 16:09:02 +08:00
2025-09-15 11:46:50 +08:00
2020-10-15 16:09:02 +08:00
2020-10-15 16:09:02 +08:00
2020-10-15 16:09:02 +08:00
2023-03-19 23:59:03 -07:00
2024-01-16 14:33:08 +00:00
2020-10-15 16:09:02 +08:00
2026-07-07 15:20:17 +08:00
2026-02-15 15:49:59 +00:00
2026-02-15 15:49:59 +00:00
2025-11-04 21:00:37 +00:00
2025-11-04 22:27:53 +00:00
2024-07-17 23:55:54 +02:00
2024-07-17 23:54:24 +02:00
2024-07-26 09:50:20 +02:00
2023-12-04 11:02:18 +00:00
2022-06-06 13:52:21 +08:00
2026-05-18 18:56:29 +00:00
2026-02-15 15:49:59 +00:00
2026-02-15 15:49:59 +00:00
2023-12-04 11:02:18 +00:00
2023-02-24 10:45:03 +00:00
2023-07-20 15:28:35 +01:00
2024-01-16 14:33:08 +00:00
2023-03-19 23:59:03 -07:00
2024-01-23 19:01:31 +03:00
2024-01-18 23:19:52 +03:00
2024-12-18 08:38:30 +08:00
2024-12-18 08:38:30 +08:00
2023-07-25 11:36:23 +01:00
2024-01-16 14:33:08 +00:00
2020-10-15 16:09:02 +08:00
2024-01-18 22:14:32 +03:00
2024-01-16 14:33:08 +00:00
2020-10-15 16:09:02 +08:00
2023-03-19 23:59:03 -07:00
2023-03-19 23:59:03 -07:00
2023-03-19 23:59:03 -07:00
2023-03-19 23:59:03 -07:00
2023-03-19 23:59:03 -07:00
2024-01-18 22:14:32 +03:00
2026-07-08 19:41:42 +08:00
2024-01-18 22:14:32 +03:00
2026-07-08 19:41:49 +08:00
2024-01-18 22:14:32 +03:00
2026-07-08 19:41:58 +08:00
2024-01-18 22:14:32 +03:00
2026-07-08 19:42:09 +08:00
2023-03-19 23:59:03 -07:00
2023-03-19 23:59:03 -07:00
2023-03-19 23:59:03 -07:00
2023-03-19 23:59:03 -07:00
2024-01-18 22:14:32 +03:00
2025-07-30 14:04:43 +00:00
2020-10-15 16:09:02 +08:00
2024-01-18 22:14:32 +03:00
2025-07-30 14:04:43 +00:00
2020-10-15 16:09:02 +08:00
2023-07-20 15:28:35 +01:00
2025-07-30 14:04:43 +00:00
2020-10-15 16:09:02 +08:00
2024-07-15 14:24:47 +00:00
2024-02-04 22:07:51 +01:00
2020-10-15 16:09:02 +08:00
2024-01-18 22:14:32 +03:00
2025-07-22 11:01:37 +02:00
2024-01-18 23:19:52 +03:00
2024-01-18 22:14:32 +03:00
2024-01-16 14:33:08 +00:00
2024-01-18 23:19:52 +03:00
2024-01-18 22:14:32 +03:00
2025-07-22 11:02:32 +02:00
2020-10-15 16:09:02 +08:00
2024-01-18 22:14:32 +03:00
2023-12-04 11:02:18 +00:00
2023-02-24 10:45:03 +00:00
2023-02-24 10:45:03 +00:00
2024-01-18 22:14:32 +03:00
2024-01-18 22:14:32 +03:00
2024-12-24 10:33:27 +08:00
2024-01-18 22:14:32 +03:00
2024-01-18 22:14:32 +03:00
2024-01-18 22:14:32 +03:00
2025-07-30 14:04:43 +00:00
2020-10-15 16:09:02 +08:00
2024-01-18 22:14:32 +03:00
2024-01-16 14:33:08 +00:00
2020-10-15 16:09:02 +08:00
2024-12-18 08:38:30 +08:00
2024-12-18 08:38:30 +08:00
2023-05-22 22:39:45 +08:00
2024-01-16 14:33:08 +00:00
2023-05-22 22:39:45 +08:00
2024-01-16 14:33:08 +00:00
2024-03-12 20:42:11 +01:00
2024-03-12 20:40:29 +01:00
2024-03-12 15:49:41 +01:00
2025-01-08 11:00:35 +08:00
2025-05-15 18:55:47 +08:00
2020-10-15 16:09:02 +08:00
2020-10-15 16:09:02 +08:00
2020-10-15 16:09:02 +08:00
2020-10-15 16:09:02 +08:00
2020-10-15 16:09:02 +08:00
2020-10-15 16:09:02 +08:00
2020-10-15 16:09:02 +08:00
2020-10-15 16:09:02 +08:00
2026-03-16 14:22:54 +08:00
2024-01-16 14:33:08 +00:00
2020-10-15 16:09:02 +08:00
2025-06-11 01:47:43 -07:00
2025-06-11 01:47:43 -07:00
2025-06-12 13:33:56 -07:00
2024-01-18 22:14:32 +03:00
2025-07-30 14:04:43 +00:00
2024-01-18 22:14:32 +03:00
2024-01-23 19:01:31 +03:00
2024-01-18 23:19:52 +03:00
2024-12-18 08:38:30 +08:00
2024-12-18 08:38:30 +08:00
2023-05-22 22:39:45 +08:00
2023-05-22 22:39:45 +08:00
2023-12-04 11:02:18 +00:00
2023-02-24 10:45:03 +00:00
2024-12-18 08:38:30 +08:00
2024-01-18 22:14:32 +03:00
2024-01-18 22:14:32 +03:00
2024-01-18 22:14:32 +03:00
2023-03-19 23:59:03 -07:00
2024-01-18 22:14:32 +03:00
2024-01-18 22:14:32 +03:00
2024-01-18 22:14:32 +03:00
2024-01-18 22:14:32 +03:00
2024-01-18 22:14:32 +03:00