Fix test threshold and improve warning output

PiperOrigin-RevId: 740738937
This commit is contained in:
Jan Wassenberg 2025-03-26 06:10:50 -07:00 committed by Copybara-Service
parent 4a924f1794
commit e55734219d
2 changed files with 5 additions and 3 deletions

View File

@ -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);

View File

@ -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;
}
}