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

Let torch.device be overrideable by TorchFunctionMode #106514

Closed
wants to merge 1 commit into from

Conversation

dilililiwhy
Copy link
Contributor

Fixes #103828
let torch.device be overrideable by TorchFunctionMode

@pytorch-bot
Copy link

pytorch-bot bot commented Aug 3, 2023

🔗 Helpful Links

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

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

✅ 1 Unrelated Failure

As of commit 1831a71:

UNSTABLE - The following job failed but was likely due to flakiness present on trunk and has been marked as unstable:

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

@mikaylagawarecki mikaylagawarecki added the triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module label Aug 3, 2023
torch/csrc/Device.cpp Outdated Show resolved Hide resolved
@ezyang
Copy link
Contributor

ezyang commented Aug 3, 2023

Looks good, just one slight modification please!

@ezyang
Copy link
Contributor

ezyang commented Aug 4, 2023

@pytorchbot merge

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

Merge failed

Reason: This PR needs a release notes: label
If your changes are user facing and intended to be a part of release notes, please use a label starting with release notes:.

If not, please add the topic: not user facing label.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "topic: not user facing"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

Details for Dev Infra team Raised by workflow job

@dilililiwhy
Copy link
Contributor Author

@pytorchbot label "release notes: composability"

@pytorch-bot pytorch-bot bot added the release notes: composability release notes category label Aug 4, 2023
@dilililiwhy
Copy link
Contributor Author

dilililiwhy commented Aug 4, 2023

@ezyang Sorry to bother you, but i have no ideas about failed check linux-jammy-py3.9-clang12-asan.

ERROR: ld.so: object '/usr/lib/llvm-7/lib/clang/7.0.1/lib/linux/libclang_rt.asan-x86_64.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
==38==ASan runtime does not come first in initial library list; you should either link runtime to your application or manually preload it with LD_PRELOAD.
Error: Process completed with exit code 1.

As i find the /usr/lib/llvm-12/lib/clang/12.0.1/lib/linux/libclang_rt.asan-x86_64.so in building stage, maybe the hardcode of llvm and clang version in .ci/pytorch/test.sh (.../llvm-7/lib/clang/7.0.1/...) caused above six test failures?

I think merge --rebase can resolve the issue. Have a try.

@dilililiwhy
Copy link
Contributor Author

@pytorchbot merge --rebase

@pytorchmergebot
Copy link
Collaborator

@pytorchbot started a rebase job onto refs/remotes/origin/viable/strict. Check the current status here

@pytorchmergebot
Copy link
Collaborator

Successfully rebased override_torch_device onto refs/remotes/origin/viable/strict, please pull locally before adding more changes (for example, via git checkout override_torch_device && git pull --rebase)

@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

@dilililiwhy dilililiwhy changed the title let torch.device be overrideable by TorchFunctionMode Let torch.device be overrideable by TorchFunctionMode Aug 16, 2023
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 Merged open source release notes: composability release notes category triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

simple and small optimization: default device argument for custom device
5 participants