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