def compute_padding(w, n_align=64):
    """compute required padding for given dimension to naturally align"""
    if w % n_align > 0:
        new_w = ((w // n_align) + 1) * n_align
    else:
        new_w = w
    pad = new_w - w
    pad_l = pad // 2
    pad_r = pad - pad_l
    return new_w, pad_l, pad_r