Skip to main content

Module test_utils

Module test_utils 

Source
Expand description

Test helpers. The eager-Tensor helpers (test_device!, assert_tensor_eq, to_vec{0,1,2,3}_round) were removed in B6; what remains is host-slice and lazy infrastructure that the lazy_* port tests use.

Functions§

assert_allclose_f32
Oracle-gate comparison helper: assert two f32 slices match within absolute tolerance atol OR relative tolerance rtol.
assert_close_vec1
Element-wise absolute-tolerance comparison for two flat f32 slices. Panics with a descriptive message on the first cell exceeding abs_tol. Used by tests whose precision baseline drifts by a few ULPs across cuDNN algorithm choices (e.g. conv backward grads where baracuda’s algorithm pick differs from a prior Fuel-internal cuDNN wrapper’s choice; both outputs are equally IEEE-754-valid).