mirror of https://github.com/google/gemma.cpp.git
Fix test threshold and improve warning output
PiperOrigin-RevId: 740738937
This commit is contained in:
parent
4a924f1794
commit
e55734219d
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue