Skip to content

[2/N] Add option context #11390

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 10 commits into
base: gh/cccclai/22/base
Choose a base branch
from
Open

[2/N] Add option context #11390

wants to merge 10 commits into from

Conversation

cccclai
Copy link
Contributor

@cccclai cccclai commented Jun 5, 2025

Stack from ghstack (oldest at bottom):

For future needs without breacking API BC, in case we need to pass more information to the update API

Differential Revision: D75919212

Differential Revision: D75919212

For future needs without breacking API BC, in case we need to pass more information to the update API

Differential Revision: [D75919212](https://our.internmc.facebook.com/intern/diff/D75919212/)

[ghstack-poisoned]
Copy link

pytorch-bot bot commented Jun 5, 2025

🔗 Helpful Links

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

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

❌ 2 New Failures, 2 Unrelated Failures

As of commit a0beade with merge base 608a745 (image):

NEW FAILURES - The following jobs have failed:

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

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

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

Copy link

github-actions bot commented Jun 5, 2025

This PR needs a release notes: label

If your change should be included in the release notes (i.e. would users of this library care about this change?), please use a label starting with release notes:. This helps us keep track and include your important work in the next release notes.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "release notes: none"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

For future needs without breacking API BC, in case we need to pass more information to the update API

Differential Revision: [D75919212](https://our.internmc.facebook.com/intern/diff/D75919212/)

[ghstack-poisoned]
@facebook-github-bot
Copy link
Contributor

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

For future needs without breacking API BC, in case we need to pass more information to the update API

Differential Revision: [D75919212](https://our.internmc.facebook.com/intern/diff/D75919212/)

[ghstack-poisoned]
@facebook-github-bot
Copy link
Contributor

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

For future needs without breacking API BC, in case we need to pass more information to the update API

Differential Revision: [D75919212](https://our.internmc.facebook.com/intern/diff/D75919212/)

[ghstack-poisoned]
@facebook-github-bot
Copy link
Contributor

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

For future needs without breacking API BC, in case we need to pass more information to the update API

Differential Revision: [D75919212](https://our.internmc.facebook.com/intern/diff/D75919212/)

Differential Revision: [D75919212](https://our.internmc.facebook.com/intern/diff/D75919212)

[ghstack-poisoned]
@facebook-github-bot
Copy link
Contributor

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

For future needs without breacking API BC, in case we need to pass more information to the update API

Differential Revision: [D75919212](https://our.internmc.facebook.com/intern/diff/D75919212/)

Differential Revision: [D75919212](https://our.internmc.facebook.com/intern/diff/D75919212)

[ghstack-poisoned]
@facebook-github-bot
Copy link
Contributor

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

For future needs without breacking API BC, in case we need to pass more information to the update API

Differential Revision: [D75919212](https://our.internmc.facebook.com/intern/diff/D75919212/)

Differential Revision: [D75919212](https://our.internmc.facebook.com/intern/diff/D75919212)

[ghstack-poisoned]
@cccclai cccclai changed the title [2/N] Add update context [2/N] Add option context Jun 18, 2025
@facebook-github-bot
Copy link
Contributor

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

For future needs without breacking API BC, in case we need to pass more information to the update API

Differential Revision: [D75919212](https://our.internmc.facebook.com/intern/diff/D75919212/)

Differential Revision: [D75919212](https://our.internmc.facebook.com/intern/diff/D75919212)

[ghstack-poisoned]
@facebook-github-bot
Copy link
Contributor

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

For future needs without breacking API BC, in case we need to pass more information to the update API

Differential Revision: [D75919212](https://our.internmc.facebook.com/intern/diff/D75919212/)

Differential Revision: [D75919212](https://our.internmc.facebook.com/intern/diff/D75919212)

[ghstack-poisoned]
@facebook-github-bot
Copy link
Contributor

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

Copy link
Contributor

@kimishpatel kimishpatel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure on the use of this. I understand you said this is introduced for BC, but can you elaborate on the BC aspect of it? Is it to avoid makign changes to client call sites? If this struct is populated then I imagine it will require client callsites to change anyway, if they want to make use of it. So maybe a bit more on this in the summary would be good.

If you do want to keep it then maybe get_option and set_option should provide both overloads? One with backendoptioncontext and one without..

@cccclai
Copy link
Contributor Author

cccclai commented Jun 23, 2025

I am not sure on the use of this. I understand you said this is introduced for BC, but can you elaborate on the BC aspect of it? Is it to avoid makign changes to client call sites? If this struct is populated then I imagine it will require client callsites to change anyway, if they want to make use of it. So maybe a bit more on this in the summary would be good.

If you do want to keep it then maybe get_option and set_option should provide both overloads? One with backendoptioncontext and one without..

Yeah to avoid making change to client call sites. I was thinking it's for pupulating runtime info from ET to the backend during set option. We can take a look at how init context helps on passing new info from ET to backend without causing BC.

Like when we pass event tracer: 0c4053e

And the named data map:
492366a

For future needs without breacking API BC, in case we need to pass more information to the update API

Differential Revision: [D75919212](https://our.internmc.facebook.com/intern/diff/D75919212/)

Differential Revision: [D75919212](https://our.internmc.facebook.com/intern/diff/D75919212)

[ghstack-poisoned]
@facebook-github-bot
Copy link
Contributor

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

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants