From e55734219dd63000216091e1f527646cd0428f15 Mon Sep 17 00:00:00 2001 From: Jan Wassenberg Date: Wed, 26 Mar 2025 06:10:50 -0700 Subject: [PATCH] Fix test threshold and improve warning output PiperOrigin-RevId: 740738937 --- ops/dot_test.cc | 2 +- ops/matmul.cc | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ops/dot_test.cc b/ops/dot_test.cc index bac78af..6aa970a 100644 --- a/ops/dot_test.cc +++ b/ops/dot_test.cc @@ -750,7 +750,7 @@ class DotStats { // Factor by which the approximate result is off; lower is better. void CheckMuls() const { // Comp2 is between Compensated and Kahan. - ASSERT_INSIDE(kComp2, 1.001, s_muls[kComp2].Mean(), 1.3); + ASSERT_INSIDE(kComp2, 1.001, s_muls[kComp2].Mean(), 1.4); ASSERT_INSIDE(kComp2, 1.001f, s_muls[kComp2].Max(), 2.4f); ASSERT_INSIDE(kComp2, 1.0, s_muls[kComp2].GeometricMean(), 1.2); diff --git a/ops/matmul.cc b/ops/matmul.cc index 8e9fc82..edca38c 100644 --- a/ops/matmul.cc +++ b/ops/matmul.cc @@ -396,8 +396,10 @@ static size_t NPMultiple(size_t N, size_t sizeof_TC, size_t nr, } // This happens in tests with small N, hence do not assert. if (N % (np_multiple * num_packages) && N >= 128) { - HWY_WARN("NPMultiple: N=%zu still not divisible by np_multiple=%zu\n", N, - np_multiple); + HWY_WARN( + "NPMultiple: N=%zu still not divisible by np_multiple=%zu " + "num_packages=%zu\n", + N, np_multiple, num_packages); np_multiple = nr; } }