Skip to content

Make sdk/executor_runner use MethodMeta interface and adjust non-const indices #317

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

Make sdk/executor_runner use MethodMeta interface and adjust non-const indices #317

wants to merge 4 commits into from

Conversation

dbort
Copy link
Contributor

@dbort dbort commented Sep 13, 2023

Summary: The new MethodMeta interface avoids the need to adjust non-const buffer indices by 1.

Differential Revision: D49208017

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported labels Sep 13, 2023
@facebook-github-bot
Copy link
Contributor

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

2 similar comments
@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot
Copy link
Contributor

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

dbort and others added 4 commits September 13, 2023 11:19
Summary:
First step in hiding the off-by-one non-const buffer indices from users. Since fewer users use `MethodMeta::num_non_const_buffers` today (relative to the version on Program), update the behavior here, along with all of its users.

After this, we can migrate the users of `Program::get_non_const_buffer_size` to this new API, fixing the off-by-one as we go.

Differential Revision: D48762563

fbshipit-source-id: aeb4a69ff3927be2146b491051356ae3ccf5be62
Summary: Make this use the new APIs. Note that MethodMeta::num_non_const_buffers is zero-based, so we can avoid the hacks that skip index zero.

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

fbshipit-source-id: 637983ac30140235360fb4ad3605b91c8ca67a51
Summary:
Using MethodMeta lets us avoid the off-by-one hack used by the (deprecated) Program versions of the buffer iterators.

While I'm here, stop using runtime_allocator to create the outputs list: it's not legal to touch the runtime_allocator after the Method is created.

Differential Revision: D48762562

fbshipit-source-id: aecda4cd7521c99f25721a2c25db56f704457168
…t indices (#317)

Summary:
Pull Request resolved: #317

The new MethodMeta interface avoids the need to adjust non-const buffer indices by 1.

Reviewed By: JacobSzwejbka

Differential Revision: D49208017

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

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

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in a404e28.

Gasoonjia pushed a commit that referenced this pull request Jul 30, 2024
Not sure if these are exactly right, but putting up a patch
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