def BF16.round

bendtorch@1.3.0.0 · dtype.bend:58

import bendtorch@1.3.0.0/dtype.bend as Dtype
import Base

58# x rounded to the nearest BF16 value, as an F32 (x.to(torch.bfloat16).to(torch.float32))
59def BF16.round(+x: F32) -> F32:
60  BF16.to_f32(BF16.of_f32(x))

Uses (3)

Used by (1)