@triton.jit
def _affine(W, B, N, x, META):
    cols = tl.arange(0, META['BLOCK_SIZE_N'])
    w = tl.load(W + cols, mask=cols < N, other=1.0)
    zero = 0.0
    zero = zero.to(w.dtype)
    w = tl.where(cols < N, w, zero)
    b = tl.load(B + cols, mask=cols < N, other=0.0)
    b = tl.where(cols < N, b, zero)
    y = x * w + b
    return y
