Skip to content

Add tests for aliasing in fake tensor#82337

Closed
eellison wants to merge 7 commits intogh/eellison/300/basefrom
gh/eellison/300/head
Closed

Add tests for aliasing in fake tensor#82337
eellison wants to merge 7 commits intogh/eellison/300/basefrom
gh/eellison/300/head

Conversation

@eellison
Copy link
Contributor

@eellison eellison commented Jul 27, 2022

@eellison eellison requested review from mruberry and ngimel as code owners July 27, 2022 18:33
eellison added a commit that referenced this pull request Jul 27, 2022
ghstack-source-id: c45b797
Pull Request resolved: #82337
@facebook-github-bot
Copy link
Contributor

facebook-github-bot commented Jul 27, 2022

🔗 Helpful links

✅ No Failures (0 Pending)

As of commit d71d0bc (more details on the Dr. CI page):

Expand to see more

💚 💚 Looks good so far! There are no failures yet. 💚 💚


This comment was automatically generated by Dr. CI (expand for details).

Please report bugs/suggestions to the (internal) Dr. CI Users group.

Click here to manually regenerate this comment.

@eellison eellison requested review from Chillee, bdhirsh and ezyang July 27, 2022 18:34
if isinstance(out, torch.Tensor):
input_storages.add(out.storage()._cdata)
for inp in tree_flatten(inputs)[0]:
if isinstance(inp, torch.Tensor) and inp.storage()._cdata in input_storages:
Copy link
Collaborator

Choose a reason for hiding this comment

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

should this use StorageWeakRef(inp.storage()) instead of a private API 😛 (I guess it doesn't matter much since they do the same thing).

eellison added a commit that referenced this pull request Jul 29, 2022
ghstack-source-id: 836113b
Pull Request resolved: #82337
eellison added a commit that referenced this pull request Aug 1, 2022
ghstack-source-id: 5173f69
Pull Request resolved: #82337
@eellison
Copy link
Contributor Author

eellison commented Aug 1, 2022

@pytorchbot merge

@pytorchmergebot
Copy link
Collaborator

@pytorchbot successfully started a merge job. Check the current status here

@github-actions
Copy link
Contributor

github-actions bot commented Aug 1, 2022

Hey @eellison.
You've committed this PR, but it does not have both a 'release notes: ...' and 'topics: ...' label. Please add one of each to the PR. The 'release notes: ...' label should represent the part of PyTorch that this PR changes (fx, autograd, distributed, etc) and the 'topics: ...' label should represent the kind of PR it is (not user facing, new feature, bug fix, perf improvement, etc). The list of valid labels can be found here for the 'release notes: ...' and here for the 'topics: ...'.
For changes that are 'topic: not user facing' there is no need for a release notes label.

facebook-github-bot pushed a commit that referenced this pull request Aug 3, 2022
Summary:
Pull Request resolved: #82337
Approved by: https://github.com/ezyang, https://github.com/bdhirsh

Test Plan: contbuild & OSS CI, see https://hud.pytorch.org/commit/pytorch/pytorch/b2f6aa666e86ed1369f7bfce4e9adab7ae4b98d4

Reviewed By: kit1980

Differential Revision: D38359256

Pulled By: eellison

fbshipit-source-id: 430eacb55ec04a3df16739ad933580b8f10a1a7f
@facebook-github-bot facebook-github-bot deleted the gh/eellison/300/head branch August 5, 2022 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants