BendtorchGpu.gr_2_f: def of bendtorch-gpu@1.3.0.0 Import: import bendtorch-gpu@1.3.0.0/main.bend as BendtorchGpu Lines 1066-1069 of bendtorch-gpu@1.3.0.0/main.bend: https://jend.leeeet.dev/read.txt?path=bendtorch-gpu@1.3.0.0/main.bend&start_line=1066&end_line=1069 import Base import bendtorch@1.3.0.0/main.bend as T # 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. # gr_2's own arithmetic: it takes the row's count and offset, so the dense lane only changes those two numbers. def gr_2_f(+n: Nat, +off: U32, +sc: F32, g: Array, r: T.PC) -> T.A2: gr_2(n, off, sc, g, r) Uses (7): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Array 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=U32 https://jend.leeeet.dev/definition.txt?path=bendtorch-gpu@1.3.0.0/main.bend&name=gr_2 https://jend.leeeet.dev/definition.txt?path=bendtorch@1.3.0.0/main.bend&name=A2 https://jend.leeeet.dev/definition.txt?path=bendtorch@1.3.0.0/main.bend&name=PC