pub fn f32_to_e4m3_rne(x: f32) -> u8
Encode with round-to-nearest-even, as torch’s .to(float8_e4m3fn) does. Saturates above 448 (callers clamp first; the fixture never gets there).
.to(float8_e4m3fn)