Skip to content

Avoid fatal checks in populate_operator_name #1511

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

Conversation

dbort
Copy link
Contributor

@dbort dbort commented Jan 3, 2024

Summary: Make populate_operator_name() return an error so we can avoid crashing when there's a problem. Also ensure that the overload field is present before using it.

Differential Revision: D52451742

Copy link

pytorch-bot bot commented Jan 3, 2024

🔗 Helpful Links

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

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

✅ You can merge normally! (3 Unrelated Failures)

As of commit a6a70af with merge base 5bc5066 (image):

FLAKY - The following jobs failed but were likely due to flakiness present on trunk:

BROKEN TRUNK - The following job failed but were present on the merge base:

👉 Rebase onto the `viable/strict` branch to avoid these failures

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 Jan 3, 2024
@facebook-github-bot
Copy link
Contributor

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

dbort added a commit to dbort/executorch that referenced this pull request Jan 3, 2024
Summary:

Make `populate_operator_name()` return an error so we can avoid crashing when there's a problem. Also ensure that the `overload` field is present before using it.

Differential Revision: D52451742
@dbort dbort force-pushed the export-D52451742 branch from 3951da4 to 73ad9a1 Compare January 3, 2024 00:58
dbort added a commit to dbort/executorch that referenced this pull request Jan 3, 2024
Summary:

Make `populate_operator_name()` return an error so we can avoid crashing when there's a problem. Also ensure that the `overload` field is present before using it.

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

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

dbort added a commit to dbort/executorch that referenced this pull request Jan 3, 2024
Summary:

Make `populate_operator_name()` return an error so we can avoid crashing when there's a problem. Also ensure that the `overload` field is present before using it.

Differential Revision: D52451742
dbort added a commit to dbort/executorch that referenced this pull request Jan 3, 2024
Summary:

Make `populate_operator_name()` return an error so we can avoid crashing when there's a problem. Also ensure that the `overload` field is present before using it.

Differential Revision: D52451742
dbort added a commit to dbort/executorch that referenced this pull request Jan 3, 2024
Summary:

Make `populate_operator_name()` return an error so we can avoid crashing when there's a problem. Also ensure that the `overload` field is present before using it.

Differential Revision: D52451742
dbort added a commit to dbort/executorch that referenced this pull request Jan 3, 2024
Summary:

Make `populate_operator_name()` return an error so we can avoid crashing when there's a problem. Also ensure that the `overload` field is present before using it.

Differential Revision: D52451742
dbort added a commit to dbort/executorch that referenced this pull request Jan 3, 2024
Summary:

Make `populate_operator_name()` return an error so we can avoid crashing when there's a problem. Also ensure that the `overload` field is present before using it.

Differential Revision: D52451742
dbort added a commit to dbort/executorch that referenced this pull request Jan 4, 2024
Summary:

Make `populate_operator_name()` return an error so we can avoid crashing when there's a problem. Also ensure that the `overload` field is present before using it.

Differential Revision: D52451742
dbort added a commit to dbort/executorch that referenced this pull request Jan 4, 2024
Summary:

Make `populate_operator_name()` return an error so we can avoid crashing when there's a problem. Also ensure that the `overload` field is present before using it.

Differential Revision: D52451742
dbort added a commit to dbort/executorch that referenced this pull request Jan 4, 2024
Summary:

Make `populate_operator_name()` return an error so we can avoid crashing when there's a problem. Also ensure that the `overload` field is present before using it.

Differential Revision: D52451742
@dbort dbort force-pushed the export-D52451742 branch 2 times, most recently from 73ad9a1 to 8d8afe7 Compare January 4, 2024 18:34
dbort added a commit to dbort/executorch that referenced this pull request Jan 4, 2024
Summary:

Make `populate_operator_name()` return an error so we can avoid crashing when there's a problem. Also ensure that the `overload` field is present before using it.

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

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

1 similar comment
@facebook-github-bot
Copy link
Contributor

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

dbort added a commit to dbort/executorch that referenced this pull request Jan 4, 2024
Summary:

Make `populate_operator_name()` return an error so we can avoid crashing when there's a problem. Also ensure that the `overload` field is present before using it.

Differential Revision: D52451742
dbort added 7 commits January 4, 2024 13:56
)

Summary:

Ensure that the `sizes` and `dim_order` fields of `Tensor` are present before using them.

Also check that `sizes` and `dim_order` have the same number of elements instead of just assuming that they're the same.

Reviewed By: larryliu0820

Differential Revision: D52451748
Summary:

Ensure that the `args` arrays of `KernelCall` and `DelegateCall` instruction entries are present before using them.

Reviewed By: larryliu0820

Differential Revision: D52451746
Summary:

Don't use the backend ID field unless it's present.

Reviewed By: lucylq

Differential Revision: D52451737
…torch#1507)

Summary:

Some MethodMeta methods don't return Error, assuming that the underlying data is valid. Ensure that the underlying ExecutionPlan is valid for those fields before returning a MethodMeta.

For fields whose accessors do return Error or Result, we can check them at the time they're called and return non-fatally then.

Reviewed By: lucylq

Differential Revision: D52451736
Summary:

I forgot to remove this from D52451739.

Reviewed By: larryliu0820

Differential Revision: D52528209
Summary:

Some compilers don't like passing enums as printf arguments without casting them first.

Reviewed By: larryliu0820

Differential Revision: D52528480
Summary:

Make `populate_operator_name()` return an error so we can avoid crashing when there's a problem. Also ensure that the `overload` field is present before using it.

Reviewed By: larryliu0820

Differential Revision: D52451742
@dbort dbort force-pushed the export-D52451742 branch from a30ef35 to a6a70af Compare January 4, 2024 21:56
@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in eb4744e.

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