Skip to content

Commit 4cc4721

Browse files
Update on "[ExecuTorch][#10447] Extend PyBundledModule with extension.BundledModule"
#10447 # Context This issue is a step of #9638. In #9638, we want to have `extension.Module` as the single source of implementation in `pybindings`, which means that `pybindings.PyModule` should use `extension.Module` rather than its own `pybindings.Module`. # Proposal Now that we have `extension.BundledModule` ready, we want to test it out by having our existing `PyBundledModule` to extend it, and let `verify_result_with_bundled_expected_output` to use it, so that we can test out the whole thing with https://github.com/pytorch/executorch/blob/fb45e19055a92d2a91a4d4b7008e135232cbb14b/devtools/bundled_program/test/test_end2end.py Differential Revision: [D73564127](https://our.internmc.facebook.com/intern/diff/D73564127/) [ghstack-poisoned]
2 parents b6f52e2 + 6bdca9c commit 4cc4721

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

devtools/bundled_program/bundled_program.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ ET_NODISCARD Error load_bundled_input(
267267
"testset_idx %zu is out of range [0, %u]",
268268
testset_idx,
269269
test_cases->size());
270-
auto bundled_inputs = test_cases->Get(testset_idx)->inputs();
270+
auto bundled_inputs = test_cases->Get(static_cast<flatbuffers::uoffset_t>(testset_idx))->inputs();
271271

272272
for (size_t input_idx = 0; input_idx < method.inputs_size(); input_idx++) {
273273
auto bundled_input = bundled_inputs->GetMutableObject(input_idx);
@@ -372,7 +372,7 @@ ET_NODISCARD Error verify_method_outputs(
372372
testset_idx,
373373
test_cases->size());
374374
auto bundled_expected_outputs =
375-
test_cases->Get(testset_idx)->expected_outputs();
375+
test_cases->Get(static_cast<flatbuffers::uoffset_t>(testset_idx))->expected_outputs();
376376

377377
if (bundled_expected_outputs->size() == 0) {
378378
// No bundled expected outputs, so we can't verify the method outputs.

0 commit comments

Comments
 (0)