-
Notifications
You must be signed in to change notification settings - Fork 540
[0.6 documentation] Fix Page Developer Tools: Bundled Program #10194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[0.6 documentation] Fix Page Developer Tools: Bundled Program #10194
Conversation
#10193 - Update the hyperlink of “Generate Sample ExecuTorch program”, as this part has been heavily revamped in v0.6: - Update to https://pytorch.org/executorch/0.6/getting-started.html#exporting - Fixed the emit stage sample code: - Use `register_buffer` as warning suggests. - Update `to_edge` to be `to_edge_transform_and_lower`, as updated in https://pytorch.org/executorch/0.6/getting-started.html. - Remove function blocks for `get_program_data`, `load_bundled_input` and `load_bundled_output`, as there are no other similar usage in the doc. - Changed to links of real-world examples. - Remove hard-coded cpp code examples. - For APIs, provide links to real-world examples. - For runtime example, change to a ready-to-use snippet for people to quickly try out. Differential Revision: [D73027728](https://our.internmc.facebook.com/intern/diff/D73027728/) [ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/10194
Note: Links to docs will display an error until the docs builds have been completed. ⏳ No Failures, 18 PendingAs of commit e4dd23a with merge base 047bbc7 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
#10193 - Update the hyperlink of “Generate Sample ExecuTorch program”, as this part has been heavily revamped in v0.6: - Update to https://pytorch.org/executorch/0.6/getting-started.html#exporting - Fixed the emit stage sample code: - Use `register_buffer` as warning suggests. - Update `to_edge` to be `to_edge_transform_and_lower`, as updated in https://pytorch.org/executorch/0.6/getting-started.html. - Remove function blocks for `get_program_data`, `load_bundled_input` and `load_bundled_output`, as there are no other similar usage in the doc. - Changed to links of real-world examples. - Remove hard-coded cpp code examples. - For APIs, provide links to real-world examples. - For runtime example, change to a ready-to-use snippet for people to quickly try out. Differential Revision: [D73027728](https://our.internmc.facebook.com/intern/diff/D73027728/) ghstack-source-id: 278155699 Pull Request resolved: #10194
This pull request was exported from Phabricator. Differential Revision: D73027728 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for updating! Overall looks good and left subtle comments
@@ -105,8 +105,8 @@ class SampleModel(torch.nn.Module): | |||
|
|||
def __init__(self) -> None: | |||
super().__init__() | |||
self.a: torch.Tensor = 3 * torch.ones(2, 2, dtype=torch.int32) | |||
self.b: torch.Tensor = 2 * torch.ones(2, 2, dtype=torch.int32) | |||
self.register_buffer('a', 3 * torch.ones(2, 2, dtype=torch.int32)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
y use register_buffer to replace torch.tensor?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To solve warnings like UserWarning: Node a target a a of does not reference an nn.Module, nn.Parameter, or buffer, which is what 'get_attr' Nodes typically target
docs/source/bundled-io.md
Outdated
```bash | ||
cd executorch | ||
./examples/devtools/build_example_runner.sh | ||
./cmake-out/examples/devtools/example_runner --bundled_program_path {your-bpte-file}.bpte --output_verification |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
./cmake-out/examples/devtools/example_runner --bundled_program_path {your-bpte-file}.bpte --output_verification | |
./cmake-out/examples/devtools/example_runner --bundled_program_path {your-bpte-file} --output_verification |
i think only bracelet here should be fine
docs/source/bundled-io.md
Outdated
``` | ||
|
||
It is expected to see no input. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's that mean?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is expected to see no input from running the above mentioned snippet.
Let me update the wording.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmmm i‘m still confused here: what do you mean by "no input to see"? What's the expected or hypnosis input user want to see?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sheesh I mean no output 😅
…ram" #10193 - Update the hyperlink of “Generate Sample ExecuTorch program”, as this part has been heavily revamped in v0.6: - Update to https://pytorch.org/executorch/0.6/getting-started.html#exporting - Fixed the emit stage sample code: - Use `register_buffer` as warning suggests. - Update `to_edge` to be `to_edge_transform_and_lower`, as updated in https://pytorch.org/executorch/0.6/getting-started.html. - Remove function blocks for `get_program_data`, `load_bundled_input` and `load_bundled_output`, as there are no other similar usage in the doc. - Changed to links of real-world examples. - Remove hard-coded cpp code examples. - For APIs, provide links to real-world examples. - For runtime example, change to a ready-to-use snippet for people to quickly try out. Differential Revision: [D73027728](https://our.internmc.facebook.com/intern/diff/D73027728/) [ghstack-poisoned]
Pull Request resolved: #10194 #10193 - Update the hyperlink of “Generate Sample ExecuTorch program”, as this part has been heavily revamped in v0.6: - Update to https://pytorch.org/executorch/0.6/getting-started.html#exporting - Fixed the emit stage sample code: - Use `register_buffer` as warning suggests. - Update `to_edge` to be `to_edge_transform_and_lower`, as updated in https://pytorch.org/executorch/0.6/getting-started.html. - Remove function blocks for `get_program_data`, `load_bundled_input` and `load_bundled_output`, as there are no other similar usage in the doc. - Changed to links of real-world examples. - Remove hard-coded cpp code examples. - For APIs, provide links to real-world examples. - For runtime example, change to a ready-to-use snippet for people to quickly try out. ghstack-source-id: 278357457 @exported-using-ghexport Differential Revision: [D73027728](https://our.internmc.facebook.com/intern/diff/D73027728/)
This pull request was exported from Phabricator. Differential Revision: D73027728 |
@Gasoonjia Thanks for reviewing! Updated as suggested. |
…ram" #10193 - Update the hyperlink of “Generate Sample ExecuTorch program”, as this part has been heavily revamped in v0.6: - Update to https://pytorch.org/executorch/0.6/getting-started.html#exporting - Fixed the emit stage sample code: - Use `register_buffer` as warning suggests. - Update `to_edge` to be `to_edge_transform_and_lower`, as updated in https://pytorch.org/executorch/0.6/getting-started.html. - Remove function blocks for `get_program_data`, `load_bundled_input` and `load_bundled_output`, as there are no other similar usage in the doc. - Changed to links of real-world examples. - Remove hard-coded cpp code examples. - For APIs, provide links to real-world examples. - For runtime example, change to a ready-to-use snippet for people to quickly try out. Differential Revision: [D73027728](https://our.internmc.facebook.com/intern/diff/D73027728/) [ghstack-poisoned]
Pull Request resolved: #10194 #10193 - Update the hyperlink of “Generate Sample ExecuTorch program”, as this part has been heavily revamped in v0.6: - Update to https://pytorch.org/executorch/0.6/getting-started.html#exporting - Fixed the emit stage sample code: - Use `register_buffer` as warning suggests. - Update `to_edge` to be `to_edge_transform_and_lower`, as updated in https://pytorch.org/executorch/0.6/getting-started.html. - Remove function blocks for `get_program_data`, `load_bundled_input` and `load_bundled_output`, as there are no other similar usage in the doc. - Changed to links of real-world examples. - Remove hard-coded cpp code examples. - For APIs, provide links to real-world examples. - For runtime example, change to a ready-to-use snippet for people to quickly try out. ghstack-source-id: 278385371 @exported-using-ghexport Differential Revision: [D73027728](https://our.internmc.facebook.com/intern/diff/D73027728/)
This pull request was exported from Phabricator. Differential Revision: D73027728 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks!
Please cherry pick this PR.
@pytorchbot cherry-pick --onto release/0.6 -c docs |
32abec5
into
gh/zhenyan-zhang-meta/3/base
This PR was created by the merge bot to help merge the original PR into the main branch. ghstack PR number: #10194 by @zhenyan-zhang-meta ^ Please use this as the source of truth for the PR details, comments, and reviews ghstack PR base: https://github.com/pytorch/executorch/tree/gh/zhenyan-zhang-meta/3/base ghstack PR head: https://github.com/pytorch/executorch/tree/gh/zhenyan-zhang-meta/3/head Merge bot PR base: https://github.com/pytorch/executorch/tree/main Merge bot PR head: https://github.com/pytorch/executorch/tree/gh/zhenyan-zhang-meta/3/orig @diff-train-skip-merge
Stack from ghstack (oldest at bottom):
#10193
register_buffer
as warning suggests.to_edge
to beto_edge_transform_and_lower
, as updated in https://pytorch.org/executorch/0.6/getting-started.html.get_program_data
,load_bundled_input
andload_bundled_output
, as there are no other similar usage in the doc.Differential Revision: D73027728