Skip to content

Make executor_runner use MethodMeta #318

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

Make executor_runner use MethodMeta #318

wants to merge 3 commits into from

Conversation

dbort
Copy link
Contributor

@dbort dbort commented Sep 13, 2023

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

@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 Sep 13, 2023
@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot
Copy link
Contributor

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

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

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

@facebook-github-bot
Copy link
Contributor

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

dbort and others added 3 commits September 13, 2023 10:25
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: f32f9497d1350366d7e3c5f25210a49d5bd053df
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: ddbc655b222ebddea1606dcfcc84b0cfd0e79da6
Summary:
Pull Request resolved: #318

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.

Reviewed By: JacobSzwejbka

Differential Revision: D48762562

fbshipit-source-id: 25ad116ca8b36ee3ba927c5f969e22d2abf473b7
@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 04d5c24.

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