Skip to content

Remove strange helpers for python -> tensor conversions, and at -> et tensor conversions #121

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 2 commits into from

Conversation

JacobSzwejbka
Copy link
Contributor

Summary: Keepalive was difficult to manage and Im not even sure how sound it was for things like strides and dim order. Now the run_method loop is a little grosser, but I think the intent is much clearer. We cast from python types to at types, and then possible have to do a hard conversion from at::tensor to ETensor which can be pretty gross since ETensor doesnt manage any memory. This highlights the need for like an ETensor wrapper that manages a bunch of state like sizes and TensorImpl

Differential Revision: D48618092

@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 Aug 24, 2023
@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot
Copy link
Contributor

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

JacobSzwejbka and others added 2 commits August 24, 2023 14:58
Summary:
Pull Request resolved: pytorch/executorch#120

.pyi file is needed for pyre to recognize the pybindings. Additionally you have to name the .pyi exactly the name of the pybinding lib which is problematic for us because we have 4 libs and 2 arent public. To make matters worse the types arg in the buck rule doesnt handle targets in the same manner as srcs. Put all this together and you get the weird genrule logic in the build files.

A couple of pyre-ignores remain in the test due to the program/operator meta apis that arent in the .pyi because Im going to move them out of pybindings extension

Differential Revision: https://internalfb.com/D48634638

fbshipit-source-id: 3b3bb3d624939bfb2b2738a7a5f91c277fc6e0f4
… tensor conversions (#121)

Summary:
Pull Request resolved: pytorch/executorch#121

Keepalive was difficult to manage and Im not even sure how sound it was for things like strides and dim order. Now the run_method loop is a little grosser, but I think the intent is much clearer. We cast from python types to at types, and then possible have to do a hard conversion from at::tensor to ETensor which can be pretty gross since ETensor doesnt manage any memory. This highlights the need for like an ETensor wrapper that manages a bunch of state like sizes and TensorImpl

Reviewed By: dbort

Differential Revision: D48618092

fbshipit-source-id: cea1feae3f801be1c6857d148a48335f9408dca0
@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 1c92891.

Gasoonjia pushed a commit that referenced this pull request Jul 30, 2024
Update README.md

Update README.md (#118)

Update README.md

Update README.md (#121)

Update REAME based on #107
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.

2 participants