-
Notifications
You must be signed in to change notification settings - Fork 9
Move autoparallel to use leaner export API #181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| 3) Be more careful about tensor constants names. | ||
| """ | ||
| with torch._dynamo.config.patch(install_free_tensors=True): | ||
| gm = _dynamo_graph_capture_for_export(model)(*inputs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function is used for new strict export and it adds implicitly sets up right calling convention using pytree. We might need to change this a bit to rely on bytecode instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc: @SherlockNoMad
| """ | ||
| with torch._dynamo.config.patch(install_free_tensors=True): | ||
| gm = _dynamo_graph_capture_for_export(model)(*inputs) | ||
| _restore_state_dict(model, gm) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
autoparallel wants the original fqn to be stored.
8bd72ef to
e66dfb1
Compare
|
rebase for the ci fixes |
e66dfb1 to
efd8617
Compare
This reverts commit f1887eb.
it needs to land after: pytorch/pytorch#164401
All the fullgraph_capture based APIs are moving towards using a common datastructure called GraphCaptureOutput. The idea is that this data structure would be used as source of truth to pull all necessary information to build a runnable compiled artifact. By doing so, we aim to enable various downstream users to build their products using modular components. Today autoparallel is using export directly which carries lot of extra stuff that autoparallel probably doesn't care about. So this PR shows that we can indeed just use a simple lean API instead of export.
Since there might be some churn in the future on the exact API, I abstract it away in a util function.
Some things we need to add are: