def fprow
import bendtorch@1.3.0.0/main.bend as Bendtorchimport Base
2457# row i of a head's P with every key: the scaled scores of query i against keys 0..t-1 (frow), then the softmax over
2458# all t of them (the law full)
2459def fprow(+i: Nat, +m: Nat, +hd: Nat, +sc: F32, +qs: U32, +qc: U32, +ks: U32, +kc: U32, q: Array<F32>, k: Array<F32>, p: Array<F32>) -> PR:
2460 fprow2(sc, (U32.from_nat(i) * U32.from_nat(1n+m) : U32), p, frow(i, m, hd, qs, qc, ks, kc, q, k))