Commits


Yufeng Li authored and GitHub committed 89f8f20a61c
fix protobuf copyfrom 2G limit (#16422) ### Description <!-- Describe your changes. --> protobuf CopyFrom doesn't work for model > 2GB for version 4.23. This PR removes the copy for Calibrator. Currently Calibrator copies the ModelProto to avoid changing it. The reason is that: quantize_static passes a ModelProto to Calibrator to calibrate quantitation parameters, and then use it for quantization. If calibrator changes the ModelProto, quantizaiton won't work. This PR changes quantize_static to pass in a model path to Calibrator instead of a ModelProto, and make Calibrator only take in model path as input, which is how it is used in most cases. This PR also remove the optimization from quantization. User needs to call pre-process to optimize the model