Expand description
Conversion to bf16 from a source wider than f32.
A backend converts to bf16 from f32 with one rounding, but from an f64 or a 32- or 64-bit
integer it goes through the nearest f32 and rounds twice: a value just past a bf16 tie can
round onto the tie in f32, then to even the wrong way. LowerWideBf16Cast narrows such a
source to f32 by rounding to odd instead, which f32’s width keeps exact for the conversion
to bf16 that follows.
Structs§
- Lower
Wide Bf16 Cast - Rewrites a cast to
bf16from a source wider thanf32as the cast from anf32rounded to odd, which the backend converts natively with the one rounding the source needs.