def Flat.mask_causal.step
import bend-tensors@0.0.0.2/bend_tensors.bend as BendTensorsimport Base
1876# cells above the diagonal (j > i) set to -3.4e38, the most negative
1877# finite float, which a softmax turns into 0 with no inf - inf
1878def Flat.mask_causal.step(+idx: U32, +i: U32, +j: U32, r: Array<F32> & F32) -> Array<F32>:
1879 (a, x) = r
1880 Array.set(F32, a, idx, Bool.pick(F32, U32.is_gt(j, i), (0.0 - 3.4028235e38 : F32), x))