Skip to content
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

Move Backend::transformPostLowering to return Expected<bool> #4346

Closed
wants to merge 1 commit into from

Conversation

@jfix71
Copy link
Contributor

jfix71 commented Mar 25, 2020

Summary:
Backend::transformPostLowering() may require some error handling/returning up the stack. Since it is called in the middle of the optimization pipeline and in the ONNXIFI interface, have it return Expected<bool> instead of bool.

Also added RETURN_IF_EXPECTED_IS_ERR() for when we want to call a function that returns some Expected and we don't care to check its return type.

Differential Revision: D20637708

@facebook-github-bot

This comment has been minimized.

Copy link

facebook-github-bot commented Mar 25, 2020

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

jfix71 added a commit to jfix71/glow that referenced this pull request Mar 25, 2020
…#4346)

Summary:
Pull Request resolved: pytorch#4346

`Backend::transformPostLowering()` may require some error handling/returning up the stack. Since it is called in the middle of the optimization pipeline and in the ONNXIFI interface, have it return `Expected<bool>` instead of `bool`.

Also added `RETURN_IF_EXPECTED_IS_ERR()` for when we want to call a function that returns some Expected and we don't care to check its return type.

Differential Revision: D20637708

fbshipit-source-id: 645deba096595ee4aa72604a39ba59d77923f2db
@jfix71 jfix71 force-pushed the jfix71:export-D20637708 branch from a56da62 to 86d69fc Mar 25, 2020
@facebook-github-bot

This comment has been minimized.

Copy link

facebook-github-bot commented Mar 25, 2020

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

Summary:
Pull Request resolved: #4346

`Backend::transformPostLowering()` may require some error handling/returning up the stack. Since it is called in the middle of the optimization pipeline and in the ONNXIFI interface, have it return `Expected<bool>` instead of `bool`.

Also added `RETURN_IF_EXPECTED_IS_ERR()` for when we want to call a function that returns some Expected and we don't care to check its return type.

Reviewed By: yinghai

Differential Revision: D20637708

fbshipit-source-id: 6c8b69f0d4659eb377d0d42968b97354ddc016ef
@facebook-github-bot

This comment has been minimized.

Copy link

facebook-github-bot commented Mar 25, 2020

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

@jfix71 jfix71 force-pushed the jfix71:export-D20637708 branch from 86d69fc to 135620b Mar 25, 2020
@facebook-github-bot

This comment has been minimized.

Copy link

facebook-github-bot commented Mar 25, 2020

This pull request has been merged in 0ddb67d.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.