def BF16.to_f32
import bendtorch@1.3.0.0/dtype.bend as Dtypeimport Base
54# BF16 -> F32 is exact: the 16 bits become the top half
55def BF16.to_f32(+h: U32) -> F32:
56 u2f(U32.shln((h .&. 65535 : U32), 16n))
import bendtorch@1.3.0.0/dtype.bend as Dtypeimport Base
54# BF16 -> F32 is exact: the 16 bits become the top half
55def BF16.to_f32(+h: U32) -> F32:
56 u2f(U32.shln((h .&. 65535 : U32), 16n))