Skip to main content

assert_allclose_f32

Function assert_allclose_f32 

Source
pub fn assert_allclose_f32(a: &[f32], b: &[f32], atol: f32, rtol: f32)
Expand description

Oracle-gate comparison helper: assert two f32 slices match within absolute tolerance atol OR relative tolerance rtol.

Used by the Phase 6a CI oracle gate — every anchor model’s forward pass runs on both realize_f32() (fast) and realize_f32() (oracle), and the two outputs must agree within tolerance. Prints the first mismatching index plus max abs/rel deviations when the assertion fires so divergences are easy to localize.