def gr_2_f
import bendtorch-gpu@1.3.0.0/main.bend as BendtorchGpuimport Base
import bendtorch@1.3.0.0/main.bend as T
1066# backward 2, dense: row r's softmax over all t, then G's row: s = dP·P over all t and G = (P * (dP - s)) * sc.
1067# gr_2's own arithmetic: it takes the row's count and offset, so the dense lane only changes those two numbers.
1068def gr_2_f(+n: Nat, +off: U32, +sc: F32, g: Array<F32>, r: T.PC) -> T.A2:
1069 gr_2(n, off, sc, g, r)