-
Notifications
You must be signed in to change notification settings - Fork 26.3k
[PyTorch] Deprecate numpy serialization for MTIA #157884
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
Summary: NumPy based tensor rebuilding from serialization has been deprecated by other backends (eg. [XLA](pytorch#137444)). The new flow has CPU storage being constructed with data from the file and then moved to the target backend device. Furthermore, relying on numpy for serialization will fail loudly when torch.load flips weights_only. Reviewed By: andyanwang Differential Revision: D77843238
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/157884
Note: Links to docs will display an error until the docs builds have been completed. ❌ 1 Cancelled Job, 2 Unrelated FailuresAs of commit 010e03f with merge base bc6e066 ( CANCELLED JOB - The following job was cancelled. Please retry:
FLAKY - The following jobs failed but were likely due to flakiness present on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
This pull request was exported from Phabricator. Differential Revision: D77843238 |
albanD
left a comment
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.
Nice!
|
@pytorchbot merge -i (Initiating merge automatically since Phabricator Diff has merged, merging with -i because oss signals were bypassed internally) |
Merge startedYour change will be merged while ignoring the following 3 checks: pull / linux-jammy-py3.9-gcc11 / test (default, 3, 5, linux.2xlarge), pull / linux-jammy-py3.9-gcc11 / test (docs_test, 1, 1, linux.2xlarge), pull / linux-jammy-py3.9-gcc11 / test (distributed, 2, 2, linux.2xlarge) Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Summary:
NumPy based tensor rebuilding from serialization has been deprecated by other backends (eg. XLA). The new flow has CPU storage being constructed with data from the file and then moved to the target backend device.
Furthermore, relying on numpy for serialization will fail loudly when torch.load flips weights_only.
Reviewed By: andyanwang
Differential Revision: D77843238
cc @egienvalue