def METHOD_NAME(inputs: Tensor):
    dim0 = inputs.size(0)
    flag = (dim0 <= 1024) or (dim0 <= 2048 and dim0 % 2 == 0) or (dim0 % 4 == 0)
    if flag and COL_MOE_KERNEL_FLAG:
        # load moe kernel during runtime if not pre-built
        build_moe_if_not_prebuilt()
        return moe.cumsum_sub_one(inputs)
    else:
        return torch.cumsum(inputs, dim=0) - 1