def Half.pack

bendtorch@1.3.0.0 · dtype.bend:238

import bendtorch@1.3.0.0/dtype.bend as Dtype
import Base
import bend-ml-tensor-array@0.1.18.0/main.bend as TA

238# a matrix encoded by f (BF16.of_f32 or F16.of_f32) and packed
239def Half.pack(~f: F32 -> U32, +r: Nat, +c: Nat, m: TA.Mat<r, c>) -> HMat<r, c>:
240  HMat{Half.words(Nat.mul(r, c), enc_l(~f, ml_l(r, c, TA.Mat.to_list(r, c, m))))}

Uses (10)

Used by (2)