Dtype.Half.pack: def of bendtorch@1.3.0.0 Import: import bendtorch@1.3.0.0/dtype.bend as Dtype Lines 238-240 of bendtorch@1.3.0.0/dtype.bend: https://jend.leeeet.dev/read.txt?path=bendtorch@1.3.0.0/dtype.bend&start_line=238&end_line=240 import Base import bend-ml-tensor-array@0.1.18.0/main.bend as TA # a matrix encoded by f (BF16.of_f32 or F16.of_f32) and packed def Half.pack(~f: F32 -> U32, +r: Nat, +c: Nat, m: TA.Mat) -> HMat: HMat{Half.words(Nat.mul(r, c), enc_l(~f, ml_l(r, c, TA.Mat.to_list(r, c, m))))} Uses (10): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.mul https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=bend-ml-tensor-array@0.1.19.0/main.bend&name=Mat https://jend.leeeet.dev/definition.txt?path=bend-ml-tensor-array@0.1.19.0/main.bend&name=Mat.to_list https://jend.leeeet.dev/definition.txt?path=bendtorch@1.3.0.0/dtype.bend&name=HMat https://jend.leeeet.dev/definition.txt?path=bendtorch@1.3.0.0/dtype.bend&name=Half.words https://jend.leeeet.dev/definition.txt?path=bendtorch@1.3.0.0/dtype.bend&name=enc_l https://jend.leeeet.dev/definition.txt?path=bendtorch@1.3.0.0/dtype.bend&name=ml_l