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