-
Notifications
You must be signed in to change notification settings - Fork 539
Update export and build from source docs #10807
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
base: main
Are you sure you want to change the base?
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/10807
Note: Links to docs will display an error until the docs builds have been completed. ❌ 1 New Failure, 1 Unrelated FailureAs of commit 61c0835 with merge base b173722 ( NEW FAILURE - The following job has failed:
FLAKY - The following job failed but was likely due to flakiness present on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
@JacobSzwejbka - can you take a look at the new content? |
|
||
### Dynamic (Data-Dependent) Control Flow | ||
|
||
Control flow is considered data-dependent if the path taken is not fixed at export-time. This is commonly the case when if or loop conditions depend on the value of a Tensor, such as a generator loop that terminates when an |
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.
Control flow is considered data-dependent if the path taken is not fixed at export-time.
This isn't true.
Its data dependent if its dependent on the data contained within the tensor rather than its shape. But shape based control flow can still be dynamic.
At runtime, the method name can be passed to `load_method` and `execute` on the `Module` class. | ||
|
||
Multi-method .ptes have several caveats: | ||
- Methods are individually memory-planned. Activation memory is not current re-used between methods. |
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.
Maybe worth mentioning you could write a custom plan to change this, or share the same arenas at runtime.
Summary
This PR makes some small updates to the docs in a few places. In the Build from Source page, I've added an explicit command to generate a test model (add.pte) to use with the executor_runner.
In the Exporting and Lowering page, I've added some details on advanced export and lowering techniques, including state management, dynamic control flow, and multi-method .ptes.
Test plan
I've built and viewed the docs locally to validate the changes.
cc @mergennachin @byjlw