Skip to content

Use aliasing constructor instead of a custom deleter in TensorImplPtr. #5725

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

Closed
wants to merge 1 commit into from
Closed

Use aliasing constructor instead of a custom deleter in TensorImplPtr. #5725

wants to merge 1 commit into from

Conversation

shoumikhin
Copy link
Contributor

Summary: .

Differential Revision: D63545997

Copy link

pytorch-bot bot commented Sep 27, 2024

🔗 Helpful Links

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

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

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

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Sep 27, 2024
@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot
Copy link
Contributor

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

2 similar comments
@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot
Copy link
Contributor

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

#5725)

Summary:
Pull Request resolved: #5725

`shared_ptr` has a so-called aliasing constructor, that allows it to manage one object, but effectively point to another one.  Here we use it to keep the data/metadata bundled together, but make the `shared_ptr` expose the address of the `TensorImpl` instance only.

Reviewed By: dbort

Differential Revision: D63545997
@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in c3460e5.

@shoumikhin
Copy link
Contributor Author

@pytorchbot cherry-pick --onto release/0.4 -c fixnewfeature

pytorchbot pushed a commit that referenced this pull request Sep 28, 2024
#5725)

Summary:
Pull Request resolved: #5725

`shared_ptr` has a so-called aliasing constructor, that allows it to manage one object, but effectively point to another one.  Here we use it to keep the data/metadata bundled together, but make the `shared_ptr` expose the address of the `TensorImpl` instance only.

Reviewed By: dbort

Differential Revision: D63545997

fbshipit-source-id: 374d8a0ed1a1558608d59246b4c6c44cb0c13398
(cherry picked from commit c3460e5)
@pytorchbot
Copy link
Collaborator

Cherry picking #5725

The cherry pick PR is at #5741 and it is recommended to link a fixnewfeature cherry pick PR with an issue. The following tracker issues are updated:

Details for Dev Infra team Raised by workflow job

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants