Skip to content

Commit 6fb7bdc

Browse files
author
zhenyanzhang
committed
Update base for 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]
1 parent 5feb8d5 commit 6fb7bdc

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

extension/module/module.h

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -531,18 +531,17 @@ class BundledModule : public Module {
531531
BundledModule& operator=(BundledModule&&) = delete;
532532

533533
/**
534-
* Execute a specific method with the input value at the given testset_idx
535-
* from the program bundle.
534+
* Load a specific method with the input value at the given `testset_idx` from
535+
* the bundle to the method.
536536
*
537-
* Before execution, this function loads the program and method with
538-
* load_bundled_input in bundled_program.
537+
* This function is a wrapper of `load_bundled_input` in `bundled_program`.
539538
*
540539
* @param[in] method_name The name of the method to execute.
541-
* @param[in] testset_idx The index of the input value to be passed to
542-
* the method.
540+
* @param[in] testset_idx The index of the input value to be passed to the
541+
* method.
543542
*
544-
* @returns A Result object containing either a vector of output values
545-
* from the method or an error to indicate failure.
543+
* @returns Return Error::Ok on a successful load, or the error happens during
544+
* execution.
546545
*/
547546
ET_NODISCARD
548547
runtime::Error load_bundled_input(
@@ -551,9 +550,9 @@ class BundledModule : public Module {
551550

552551
/**
553552
* Verify the output of a specific method with the expected output from the
554-
* program bundle at the given testset_idx.
553+
* program bundle at the given `testset_idx`.
555554
*
556-
* This function is a wrapper of verify_method_outputs in bundled_program.
555+
* This function is a wrapper of `verify_method_outputs` in `bundled_program`.
557556
*
558557
* @param[in] method_name The name of the method to extract outputs from.
559558
* @param[in] testset_idx The index of expected output needs to be compared.

0 commit comments

Comments
 (0)