def dq_row

bendtorch@1.3.0.0 · dtype.bend:415

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

415# W back in F32: q[i, j] · s_i, one F32 product each
416def dq_row(k: Nat, +e: U32, +s: F32, acc: List<&2, F32>, rq: Array<U32> & U32) -> UF:
417  match k rq:
418    case 0n Tuple{q, w}:
419      UF{q, acc}
420    case 1n+p Tuple{q, +w}:
421      dq_row(p, (e + 1 : U32), s, (q8_at(e, w) * s : F32) <> acc, Array.get(U32, q, U32.shrn((e + 1 : U32), 2n)))

Uses (13)

Used by (1)