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

[3/n] loading meta to device #100495

Closed
wants to merge 1 commit into from
Closed

Conversation

qxy11
Copy link
Contributor

@qxy11 qxy11 commented May 2, 2023

Summary: Make it possible to torch.jit.load(model, device) to a device when model contains weights that are on device meta. Just leave the meta weights on meta, and load the weights that can be loaded to the target device.

Reviewed By: singlaiiit, RoshanPAN, sayitmemory

Differential Revision: D45099145

@pytorch-bot pytorch-bot bot added the release notes: jit release notes category label May 2, 2023
@pytorch-bot
Copy link

pytorch-bot bot commented May 2, 2023

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/100495

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit c968898:
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D45099145

Copy link
Member

@houseroad houseroad left a comment

Choose a reason for hiding this comment

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

Looks good.

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D45099145

qxy11 added a commit to qxy11/pytorch that referenced this pull request May 5, 2023
Summary:
Pull Request resolved: pytorch#100495

Make it possible to `torch.jit.load(model, device)` to a device when `model` contains weights that are on device `meta`. Just leave the `meta` weights on `meta`, and load the weights that can be loaded to the target device.

Reviewed By: houseroad

Differential Revision: D45099145

fbshipit-source-id: 4cf3cc9d46409c48ade737937fded1491f8361d2
Summary:
Pull Request resolved: pytorch#100495

Make it possible to `torch.jit.load(model, device)` to a device when `model` contains weights that are on device `meta`. Just leave the `meta` weights on `meta`, and load the weights that can be loaded to the target device.

Reviewed By: houseroad

Differential Revision: D45099145

fbshipit-source-id: a7e477e0632c55bfa4827a2183164f07ab1ee7da
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D45099145

@facebook-github-bot
Copy link
Contributor

@pytorchbot merge

(Initiating merge automatically since Phabricator Diff has merged)

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label May 8, 2023
@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ciflow/trunk Trigger trunk jobs on your pull request fb-exported Merged release notes: jit release notes category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants