@@ -818,9 +818,12 @@ class DotStats {
818818 ASSERT_INSIDE (kComp2 , 2E-4 , s_rels[kComp2 ].GeometricMean (), 1E-2 );
819819 ASSERT_INSIDE (kComp2 , 1E-5f , s_rels[kComp2 ].Max (), 1 .23f );
820820
821- // Compensated and Double are very accurate.
821+ // Compensated and Double are very accurate. kCompensated Max bumped
822+ // from 8E-6f to accommodate Highway's new vectorized u32 hash RNG, which
823+ // shifts the deterministic test inputs and pushes the measured max to
824+ // ~1.6e-5 on Apple Silicon NEON_BF16/NEON_WITHOUT_AES.
822825 ASSERT_LESS (kCompensated , s_rels[kCompensated ].Min (), 1E-8f );
823- ASSERT_LESS (kCompensated , s_rels[kCompensated ].Max (), 8E- 6f );
826+ ASSERT_LESS (kCompensated , s_rels[kCompensated ].Max (), 3E- 5f );
824827 ASSERT_LESS (kDouble , s_rels[kDouble ].Min (), 1E-8f );
825828 ASSERT_LESS (kDouble , s_rels[kDouble ].Max (), 8E-6f );
826829
@@ -829,8 +832,10 @@ class DotStats {
829832 ASSERT_INSIDE (kOnlyTwoProd , 1E-3 , s_rels[kOnlyTwoProd ].GeometricMean (),
830833 7.5E-2 );
831834
832- // Kahan (FastTwoSum) is decent:
833- ASSERT_INSIDE (kKahan , 3E-4 , s_rels[kKahan ].GeometricMean (), 1E-2 );
835+ // Kahan (FastTwoSum) is decent. Upper bound bumped from 1E-2 to
836+ // accommodate Highway's vectorized hash RNG shift (measured ~1.20e-2 on
837+ // Apple Silicon NEON_BF16/NEON_WITHOUT_AES).
838+ ASSERT_INSIDE (kKahan , 3E-4 , s_rels[kKahan ].GeometricMean (), 1.5E-2 );
834839 ASSERT_INSIDE (kKahan , 6E-4f , s_rels[kKahan ].Max (), 0 .7f );
835840
836841 // TwoProducts and TwoSums are a bit better.
@@ -849,8 +854,9 @@ class DotStats {
849854 void CheckBwd () const {
850855 ASSERT_INSIDE (kComp2 , 7E-10f , s_rels[kComp2 ].Max (), 1 .3f );
851856
852- // Compensated and Double are very accurate.
853- ASSERT_LESS (kCompensated , s_rels[kCompensated ].Max (), 8E-6f );
857+ // Compensated and Double are very accurate. See CheckRel for the
858+ // kCompensated bound rationale (Highway vectorized hash RNG shift).
859+ ASSERT_LESS (kCompensated , s_rels[kCompensated ].Max (), 3E-5f );
854860 ASSERT_LESS (kDouble , s_rels[kDouble ].Max (), 8E-6f );
855861
856862 // Naive and OnlyTwoProd are considerably higher than others
0 commit comments