def vitis_quantize_data(data, bit_width=8, method=PowerOfTwoMethod.NonOverflow):
    """
    Quantize the input data using the PowerOfTwoMethod.
    """
    if method == PowerOfTwoMethod.NonOverflow:
        pos = get_pos_overflow(data)
    elif method == PowerOfTwoMethod.MinMSE:
        pos = get_pos_min_mse(data)
    else:
        raise ValueError(f"Unsupported method: {method}")

    scale, lower_bound, upper_bound = get_bound_and_scale(pos)
    zero_point = 0
    quantized_data = vitis_quantize(data, pos=pos)
    return lower_bound, upper_bound, zero_point, scale, quantized_data

    Quantize the input data using the PowerOfTwoMethod.
    
olive/passes/onnx/vitis_ai/quant_utils.py