Skip to content
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

Pass folder path to store initializers as files #929

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

wschin
Copy link
Contributor

@wschin wschin commented Jul 27, 2023

One solution for #493. It requires small PyTorch exporter change to passing the newly added parameter from user code -> pytorch-to-onnx exporter -> onnxscript.

This should replace #930 as a final solution of #493.

@BowenBao
Copy link
Contributor

I'm thinking about making the api to return model_proto and initializers separately. It is similar to what you did with symbolic_trace. The model_proto and initializers are only written to disk on the save/serialize call.

# model_proto frame and initializers are still in memory, inside export_output.
export_output = torch.onnx.dynamo_export(model, ...)
# Now we have the path, serialize model to there.
export_output.save("path_to_model.onnx")

@justinchuby
Copy link
Contributor

Added comments in #493.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants