@triton.jit
def _layer_norm_no_affine_bwd(DX, DY, Y, V, stride, N, **META):
    row = tl.program_id(0)
    cols = tl.arange(0, META['BLOCK_SIZE_N'])
    y_ptrs = Y + row * stride + cols
    dy_ptrs = DY + row * stride + cols
    y = tl.load(y_ptrs, mask=cols < N, other=0).to(tl.float32)
    dy = tl.load(dy_ptrs, mask=cols < N, other=0).to(tl.float32)
    rstd = tl.load(V + row)
    xhat = tl.where(cols < N, y, 0.0)
    wdy = tl.where(cols < N, dy, 0.0)
    mean1 = tl.sum(xhat * wdy, axis=0) / N
    mean2 = tl.sum(wdy, axis=0) / N
    dx = (wdy - (xhat * mean1 + mean2)) * rstd
    _store(dx, DX, stride, N, META)
