You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make quantize_pt2 return an ExportedProgram instead of a GraphModule (#10644)
Summary:
This will help differentiating the fp32 models from the quantized models, and prevent people from using the wrong APIs.
For fp32 cases, we have a `torch.nn.Module`, which we trace and then lower. For quantized cases, we trace, quantize, and lower.
After this diff, `export_to_<edge, executorch>` will ONLY handle non-quantized cases, and importantly, the sequence of `quantize_pt2` and then `export_to_<edge, executorch>` will not work anymore. Those cases should use the (existing) `lower_ep_to_<edge, executorch>` instead.
Note that in subsequent diffs, both `quantize_pt2` and `lower_ep_to<edge, executorch` should be inner calls, not exposed to users
Reviewed By: Vysarat, zonglinpeng
Differential Revision: D73722640
0 commit comments