oa::matrix::causal_mask
Apply the additive causal mask to the final two score dimensions. Every [.., Tq, Tk] plane keeps positions k <= q and writes -1e9 above the diagonal, matching OA C++ FnMatrix::causalMask. Inputs require at least two axes; earlier axes are treated as a flattened batch. Errors Returns an error when input is not FP32, has fewer than two axes or an empty extent, its element count exceeds the shader ABI, allocation fails, or runtime recording fails.
Function Documentation
Apply the additive causal mask to the final two score dimensions. Every [.., Tq, Tk] plane keeps positions k <= q and writes -1e9 above the diagonal, matching OA C++ FnMatrix::causalMask. Inputs require at least two axes; earlier axes are treated as a flattened batch. Errors Returns an error when input is not FP32, has fewer than two axes or an empty extent, its element count exceeds the shader ABI, allocation fails, or runtime recording fails.