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

Provide a save/restore API which does not require every tensor to be … #2140

Merged
merged 1 commit into from
May 29, 2020

Conversation

dlibenzi
Copy link
Collaborator

…loaded on host memory during the save operation.

@dlibenzi
Copy link
Collaborator Author

Fixes #1870

Copy link
Contributor

@ailzhang ailzhang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Collaborator

@JackCaoG JackCaoG left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

controls whether every host's master (if ``global_master`` is ``False``)
saves the content, or only the global master (ordinal 0).
Default: False
"""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Btw maybe we could add a warning here about "sharing storage" is not preserved after save-load.
(it's preserved for CPU/CUDA backend so good to clarify. ;)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do have a section in our docs talking about that, but I guess we can add something here (and xm.save()) as well.

https://github.com/pytorch/xla/blob/master/API_GUIDE.md#saving-and-loading-xla-tensors

…loaded on host memory during the save operation.
@dlibenzi dlibenzi force-pushed the lowmem_serialization branch from 5bb0b43 to 91af76c Compare May 29, 2020 00:43
@dlibenzi dlibenzi merged commit 2abcdd2 into master May 29, 2020
@dlibenzi dlibenzi deleted the lowmem_serialization branch May 29, 2020 13:40
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.

3 participants