From 4001d7a74f7866bdcd8855caca62436ca7bc45ee Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Sat, 17 Jan 2026 20:53:51 +0100 Subject: [PATCH 1/2] Increase LA464/16MB DGEMM_R for minimal spacing of 64 to MAX(p,q) --- kernel/setparam-ref.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/setparam-ref.c b/kernel/setparam-ref.c index 24bd81a8e3..51981c6253 100644 --- a/kernel/setparam-ref.c +++ b/kernel/setparam-ref.c @@ -1194,7 +1194,7 @@ static void init_parameter(void) { TABLE_NAME.dgemm_p = 112; TABLE_NAME.dgemm_q = 289; - TABLE_NAME.dgemm_r = 342; + TABLE_NAME.dgemm_r = 353; TABLE_NAME.cgemm_p = 128; TABLE_NAME.cgemm_q = 256; From f298361f98ce3653b0b50e15b2867d191c1220d6 Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Sat, 17 Jan 2026 20:58:49 +0100 Subject: [PATCH 2/2] Document size restriction on GEMM_R --- docs/faq.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/faq.md b/docs/faq.md index de2f54bc38..d68be9ed12 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -47,7 +47,8 @@ You can find the full list of modifications in Changelog.txt. The detailed explanation is probably in the original publication authored by Kazushige Goto - Goto, Kazushige; van de Geijn, Robert A; Anatomy of high-performance matrix multiplication. ACM Transactions on Mathematical Software (TOMS). Volume 34 Issue 3, May 2008 While this article is paywalled and too old for preprints to be available on arxiv.org, more recent publications like https://arxiv.org/pdf/1609.00076 contain at least a brief description of the algorithm. -In practice, the values are derived by experimentation to yield the block sizes that give the highest performance. A general rule of thumb for selecting a starting point seems to be that PxQ is about half the size of L2 cache. +In practice, the values are derived by experimentation to yield the block sizes that give the highest performance. A general rule of thumb for selecting a starting point seems to be that PxQ is about half the size of L2 cache. R needs to be greater than the bigger of P and Q by +at least 64, or bad things will happen with the work splitting in (at least) POTRF. ### How can I report a bug?