Skip to content

Refactor write_tensor_or_raise_error to Return Error Codes Instead of Raising Errors #11051

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Juntian777
Copy link

Summary:
This PR to make the write_tensor_or_raise_error function error out more gracefully by updating the signature of write_tensor_or_raise_error to return executorch::runtime::Result instead of long

Check the error code and raise an error if needed after invoking write_tensor_or_return_error function using ET_CHECK_MSG

Reviewed By: Gasoonjia

Differential Revision: D75111482

Copy link

pytorch-bot bot commented May 21, 2025

🔗 Helpful Links

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

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

✅ No Failures

As of commit d11099c with merge base 2d0d7d7 (image):
💚 Looks good so far! There are no failures yet. 💚

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 May 21, 2025
@facebook-github-bot
Copy link
Contributor

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

@Juntian777
Copy link
Author

@pytorchbot label "release notes: none"

@pytorch-bot pytorch-bot bot added the release notes: none Do not include this in the release notes label May 21, 2025
Juntian777 added a commit to Juntian777/executorch that referenced this pull request May 21, 2025
… Raising Errors (pytorch#11051)

Summary:

This PR to make the write_tensor_or_raise_error function error out more gracefully by updating the signature of write_tensor_or_raise_error to return executorch::runtime::Result<long> instead of long

Check the error code and raise an error if needed after invoking write_tensor_or_return_error function using ET_CHECK_MSG

Reviewed By: Gasoonjia

Differential Revision: D75111482
Juntian777 added a commit to Juntian777/executorch that referenced this pull request May 21, 2025
… Raising Errors (pytorch#11051)

Summary:

This PR to make the write_tensor_or_raise_error function error out more gracefully by updating the signature of write_tensor_or_raise_error to return executorch::runtime::Result<long> instead of long

Check the error code and raise an error if needed after invoking write_tensor_or_return_error function using ET_CHECK_MSG

Reviewed By: Gasoonjia

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

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

Juntian777 added a commit to Juntian777/executorch that referenced this pull request May 21, 2025
… Raising Errors (pytorch#11051)

Summary:
Pull Request resolved: pytorch#11051

This PR to make the write_tensor_or_raise_error function error out more gracefully by updating the signature of write_tensor_or_raise_error to return executorch::runtime::Result<long> instead of long

Check the error code and raise an error if needed after invoking write_tensor_or_return_error function using ET_CHECK_MSG

Reviewed By: Gasoonjia

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

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

Juntian777 added a commit to Juntian777/executorch that referenced this pull request May 21, 2025
… Raising Errors (pytorch#11051)

Summary:
Pull Request resolved: pytorch#11051

This PR to make the write_tensor_or_raise_error function error out more gracefully by updating the signature of write_tensor_or_raise_error to return executorch::runtime::Result<long> instead of long

Check the error code and raise an error if needed after invoking write_tensor_or_return_error function using ET_CHECK_MSG

Reviewed By: Gasoonjia

Differential Revision: D75111482
@Juntian777 Juntian777 force-pushed the export-D75111482 branch 2 times, most recently from b45ad8d to a521443 Compare May 22, 2025 20:14
Juntian777 added a commit to Juntian777/executorch that referenced this pull request May 22, 2025
… Raising Errors (pytorch#11051)

Summary:

This PR to make the write_tensor_or_raise_error function error out more gracefully by updating the signature of write_tensor_or_raise_error to return executorch::runtime::Result<long> instead of long

Check the error code and raise an error if needed after invoking write_tensor_or_return_error function using ET_CHECK_MSG

Reviewed By: Gasoonjia

Differential Revision: D75111482
… Raising Errors (pytorch#11051)

Summary:
Pull Request resolved: pytorch#11051

This PR to make the write_tensor_or_raise_error function error out more gracefully by updating the signature of write_tensor_or_raise_error to return executorch::runtime::Result<long> instead of long

Check the error code and raise an error if needed after invoking write_tensor_or_return_error function using ET_CHECK_MSG

Reviewed By: Gasoonjia

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

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

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 release notes: none Do not include this in the release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants