SIGN IN SIGN UP

Adjust MethodMeta's non-const indices by 1, and update all users (#315)

Summary:
Pull Request resolved: https://github.com/pytorch/executorch/pull/315

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.

I found all of these uses with the search

```
cd fbsource
xbgs -sl "non_const_buffer_size" | xargs grep -le '\<non_const_buffer_size\>'
```

Luckily, `Program`'s version of this is called `get_non_const_buffer_size` (with the extra `get_` prefix) so it was straightforward to find code that used `MethodMeta`'s methods.

Reviewed By: JacobSzwejbka

Differential Revision: D48762563

fbshipit-source-id: bd5b1b7dc7702cf0192261b535d59e8ba80b96e4
D
Dave Bort committed
5762802b47bca6ee9e85e50f21615554b815828c
Parent: 1f558c7
Committed by Facebook GitHub Bot <facebook-github-bot@users.noreply.github.com> on 9/13/2023, 7:35:36 PM