-
Notifications
You must be signed in to change notification settings - Fork 24.2k
Avoid __ne__
weakref comparison and use identity instead in cache_size.py
#135000
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
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/135000
Note: Links to docs will display an error until the docs builds have been completed. ✅ You can merge normally! (1 Unrelated Failure)As of commit 4f68a47 with merge base 8f5c2b5 ( FLAKY - The following job failed but was likely due to flakiness present on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This change is needed because >>> obj = torch.randn((10,))
>>> ref1 = weakref.ref(obj)
>>> ref2 = weakref.ref(obj)
>>> print(ref1 == ref2) # True
tensor([True, True, True, True, True, True, True, True, True, True])
>>> print(ref1 is ref2) # False
True |
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.
Can you add a test please?
@anijain2305 I tried to find one simple test but couldn't so far. I'll let you know once I do |
@pytorchmergebot merge |
Merge failedReason: This PR needs a If not, please add the To add a label, you can comment to pytorchbot, for example For more information, see Details for Dev Infra teamRaised by workflow job |
…ize.py ghstack-source-id: 886c5f1 Pull Request resolved: pytorch/pytorch#135000
@pytorchmergebot 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: 9 jobs have failed, first few of them are: inductor / rocm6.1-py3.8-inductor / test (inductor, 1, 1, linux.rocm.gpu.2), trunk / linux-focal-cuda12.4-py3.10-gcc9-no-ops / build, trunk / linux-focal-cuda12.4-py3.10-gcc9-experimental-split-build / build, trunk / linux-focal-cuda12.4-py3.10-gcc9-sm86 / build, trunk / linux-focal-cuda11.8-py3.10-gcc9-experimental-split-build / build Details for Dev Infra teamRaised by workflow job |
@pytorchmergebot 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 |
Stack from ghstack (oldest at bottom):
__ne__
weakref comparison and use identity instead in cache_size.py #135000cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @chenyang78 @kadeng @chauhang @amjames @rec