@triton.jit
def causal_mask(offs_m, offs_n, M, N, EVEN_M: tl.constexpr, EVEN_N: tl.
    constexpr):
    shift = N - M
    mask = shift + offs_m[:, None] >= offs_n[None, :]
    if not EVEN_M & EVEN_N:
        mask = mask & make_bounds(offs_m, offs_n, M, N, EVEN_M, EVEN_N)
    return tl.where(mask, 0, float('-inf'))
