simplify runtime api input (#1140)
Summary:
Pull Request resolved: https://github.com/pytorch/executorch/pull/1140
This diff removes the input memory_allocator and method_name of bundled program runtime apis. We no longer need the allocator, and will use the same method name as input method in bundled program, after this diff. It makes runtime APIs easier to use.
Before:
```
__ET_NODISCARD Error LoadBundledInput(
Method& method,
serialized_bundled_program* bundled_program_ptr,
MemoryAllocator* memory_allocator,
const char* method_name,
size_t testset_idx);
__ET_NODISCARD Error VerifyResultWithBundledExpectedOutput(
Method& method,
serialized_bundled_program* bundled_program_ptr,
MemoryAllocator* memory_allocator,
const char* method_name,
size_t testset_idx,
double rtol = 1e-5,
double atol = 1e-8);
```
Now
```
__ET_NODISCARD Error LoadBundledInput(
Method& method,
serialized_bundled_program* bundled_program_ptr,
size_t testset_idx);
__ET_NODISCARD Error VerifyResultWithBundledExpectedOutput(
Method& method,
serialized_bundled_program* bundled_program_ptr,
size_t testset_idx,
double rtol = 1e-5,
double atol = 1e-8);
```
Reviewed By: tarun292
Differential Revision: D50422559
fbshipit-source-id: 52b719974240ed62e5d1497a687aa535cc87c68e S
Songhao Jia committed
6f373735743124205271309ea94246760f88ca7e
Parent: c177cf7
Committed by Facebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
on 11/6/2023, 7:49:56 PM