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
Enable torch.jit.load for custom device #99535
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/99535
Note: Links to docs will display an error until the docs builds have been completed. ❗ 1 Active SEVsThere are 1 currently active SEVs. If your PR is affected, please view them below: ✅ No FailuresAs of commit e2cefc9: This comment was automatically generated by Dr. CI and updates every 15 minutes. |
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.
Note that torchscript is not actively maintained. So I'm not sure you should work on getting TS to work with your backend.
If you're looking for a compiler backend, I think you should look into torch.compile which is replacing TS.
Accepting this as it is small and seems harmless enough.
@pytorchbot merge |
Merge startedYour 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 |
Merge failedReason: 1 jobs have failed, first few of them are: trunk / macos-12-py3-arm64 / test (default, 2, 3, macos-m1-12) Details for Dev Infra teamRaised by workflow job |
@pytorchbot merge |
Merge startedYour 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 |
Merge failedReason: 4 jobs have failed, first few of them are: trunk / macos-12-py3-arm64 / test (default, 2, 3, macos-m1-12), trunk / linux-focal-rocm5.4.2-py3.8 / test (default, 1, 3, linux.rocm.gpu), trunk / linux-focal-rocm5.4.2-py3.8 / test (default, 2, 3, linux.rocm.gpu), trunk / linux-focal-rocm5.4.2-py3.8 / test (default, 3, 3, linux.rocm.gpu) Details for Dev Infra teamRaised by workflow job |
Merge startedYour change will be merged while ignoring the following 4 checks: trunk / macos-12-py3-arm64 / test (default, 2, 3, macos-m1-12), trunk / linux-focal-rocm5.4.2-py3.8 / test (default, 1, 3, linux.rocm.gpu), trunk / linux-focal-rocm5.4.2-py3.8 / test (default, 2, 3, linux.rocm.gpu), trunk / linux-focal-rocm5.4.2-py3.8 / test (default, 3, 3, linux.rocm.gpu) Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Merge failedReason: 1 jobs have failed, first few of them are: trunk / win-vs2019-cuda11.7-py3 / test (force_on_cpu, 1, 1, windows.4xlarge) Details for Dev Infra teamRaised by workflow job |
@pytorchbot merge ic |
❌ 🤖 pytorchbot command failed:
Try |
@pytorchbot merge |
Merge startedYour 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 |
Merge failedReason: 5 jobs have failed, first few of them are: trunk / macos-12-py3-arm64 / test (default, 2, 3, macos-m1-12), trunk / linux-focal-rocm5.4.2-py3.8 / test (default, 1, 3, linux.rocm.gpu), trunk / linux-focal-rocm5.4.2-py3.8 / test (default, 2, 3, linux.rocm.gpu), trunk / linux-focal-rocm5.4.2-py3.8 / test (default, 3, 3, linux.rocm.gpu), trunk / win-vs2019-cuda11.7-py3 / test (force_on_cpu, 1, 1, windows.4xlarge) Details for Dev Infra teamRaised by workflow job |
@pytorchbot merge -r |
@pytorchbot successfully started a rebase job. Check the current status here |
Successfully rebased |
995beda
to
e2cefc9
Compare
Merge startedYour 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 |
Fixes #ISSUE_NUMBER 1、torch.jit.load for custom device ``` # custom device named `foo` ts_model = torch.jit.script(mode.to(device="foo")) ts_model.save("./ts.pt") # it is a script model on device `foo` # and then we want to load it and run it torch.jit.load("./ts.pt") ``` 2、 add some extra key for custom device with `privateuse1` Approved by: https://github.com/albanD [ghstack-poisoned]
Fixes #ISSUE_NUMBER
1、torch.jit.load for custom device
2、 add some extra key for custom device with
privateuse1