executorch icon indicating copy to clipboard operation
executorch copied to clipboard

[ExecuTorch][#10375] Add `extension.BundledModule` to Wrap `extension.Module` with Bundled Program Logic

Open zhenyan-zhang-meta opened this issue 7 months ago • 4 comments

Stack from ghstack (oldest at bottom):

  • #10450
  • -> #10449

https://github.com/pytorch/executorch/issues/10375

Context

This issue is a step of https://github.com/pytorch/executorch/discussions/9638.

In https://github.com/pytorch/executorch/discussions/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.

The issue is that pybindings.PyModule is dependent on the method getter from pybindings.Module, which extension.Module do not have. Since we don't want to expose method getter in extension.Module, we have to protect the getter, wrap the functions that is dependent on it and use the protected getter there, ultimately decouple pybindings from a method getter.

Proposal

Now that we have a protected method getter, we can introduce a extension.BundledModule, a child class inheriting extension.Module which wraps up bundled program logic that is dependent on the method getter.

Differential Revision: D73564125

zhenyan-zhang-meta avatar Apr 24 '25 21:04 zhenyan-zhang-meta

:link: Helpful Links

:test_tube: See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/10449

Note: Links to docs will display an error until the docs builds have been completed.

:x: 1 New Failure

As of commit 54cf39faec9584952f76f2314cef60df5c01c985 with merge base 9febabd8345a3f09bb9ca8bd0e3550dc8f59606a (image):

NEW FAILURE - The following job has failed:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

pytorch-bot[bot] avatar Apr 24 '25 21:04 pytorch-bot[bot]

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

facebook-github-bot avatar Apr 24 '25 21:04 facebook-github-bot

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

facebook-github-bot avatar Apr 24 '25 21:04 facebook-github-bot

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

facebook-github-bot avatar Apr 24 '25 23:04 facebook-github-bot

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

facebook-github-bot avatar Apr 29 '25 00:04 facebook-github-bot

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

facebook-github-bot avatar Apr 29 '25 23:04 facebook-github-bot

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

facebook-github-bot avatar Apr 30 '25 01:04 facebook-github-bot

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

facebook-github-bot avatar Apr 30 '25 01:04 facebook-github-bot

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

facebook-github-bot avatar Apr 30 '25 01:04 facebook-github-bot

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

facebook-github-bot avatar Apr 30 '25 02:04 facebook-github-bot

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

facebook-github-bot avatar Apr 30 '25 02:04 facebook-github-bot

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

facebook-github-bot avatar Apr 30 '25 05:04 facebook-github-bot

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

facebook-github-bot avatar Apr 30 '25 07:04 facebook-github-bot

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

facebook-github-bot avatar Apr 30 '25 18:04 facebook-github-bot

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

facebook-github-bot avatar May 05 '25 17:05 facebook-github-bot

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

facebook-github-bot avatar May 05 '25 18:05 facebook-github-bot

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

facebook-github-bot avatar May 06 '25 21:05 facebook-github-bot