-
Notifications
You must be signed in to change notification settings - Fork 593
New Getting Started documentation #8179
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
New Getting Started documentation #8179
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/8179
Note: Links to docs will display an error until the docs builds have been completed. ❗ 1 Active SEVsThere are 1 currently active SEVs. If your PR is affected, please view them below: ❌ 1 New FailureAs of commit d3d2a5a with merge base a5c7609 ( NEW FAILURE - The following job has failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
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.
In general looks good in terms of structure
I added some inline comments
Let's actually create a separate branch and starting merging into the new branch.
That way, we can actually start working on this collaboratively on document revamp. Once things are in good condition, we can merge the whole branch onto main.
Otherwise, I don't want to be in this limbo state where some parts of the doc is working and some are not working for external documentation. A lot of people are still looking main doc (as opposed to stable)
https://pytorch.org/executorch/main/getting-started-setup.html
``` | ||
pip install executorch | ||
``` | ||
|
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.
For the time being, we should still have a way to install from source steps
At least have a pointer to another page/section.
Otherwise, as I said in the previous comment, we're not ready yet.
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.
Where do you see the current gaps? IMO we should prioritize this as much as possible, since build + install is a big source of friction currently.
docs/source/getting-started.md
Outdated
After successfully generating a .pte file, it is common to use the Python runtime bindings to validate the model. This can be used to evaluate model accuracy before running on-device. | ||
|
||
<hr/> | ||
|
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.
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.
Makes sense. I'd like to do another pass once we get the "core" framework docs in place to figure out how LLMs and transformers fit in.
docs/source/getting-started.md
Outdated
- One or more target hardware backends. | ||
|
||
### Selecting a Backend | ||
ExecuTorch provides hardware backends for a wide variety of hardware. The most commonly used backends are XNNPACK, for ARM and x86 CPU, CoreML (for iOS), and Vulkan (for Android GPUs). |
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.
Mention Qualcomm for Android NPU
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.
Added. I do think that it is very hard to use NPU delegates right now, in part because we don't expose any sane way to detect if the user is running supported hardware, and they need to ship a fully separate PTE. Hopefully backend capabilities + program data separation will help alleviate this. Until then, I think it's a hard sell to get anyone to do the extra work unless they really want every bit of performance. Internally, I've had a hard time getting people to sign up to support multiple delegates because of the amount of work needed to export another PTE + test it + write runtime code. I'd like to focus on this once we get the core CPU + CoreML experience tightened up.
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.
Quick drive by, this is great 👍🏻
77a29b5
to
fe2b102
Compare
Can you convert this an actual PR. Also, I don't see the new branch for the upstream. |
Backend delegates may require additional dependencies. See the appropriate backend documentation for more information. | ||
|
||
#### System Requirements | ||
The following are required to install the ExecuTorch host libraries, needed to export models and run from Python. Requirements for target end-user devices are backend dependent. See the appropriate backend documentation for more information. |
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.
"run from Python" -> change to "run".
The reason is that we're listing g++ requirements below, which is confusing.
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.
I thought that we needed a C++ compiler to install the pip package, as some parts were locally compiled at install time? I could be wrong on that, though.
@dbort Do you know if a C++ compiler is required to install the pip package?
model = MyModel() # The PyTorch model to export | ||
example_inputs = (torch.randn(1,3,64,64),) # A tuple of inputs | ||
|
||
et_program = |
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.
np: formatting is a bit strange
fe2b102
to
d3d2a5a
Compare
504b5e0
into
pytorch:executorch-just-works
WIP New getting started
* New Getting Started documentation (#8179) WIP New getting started * Update documentation flow and add placeholders (#8287) Add placeholder top-level doc pages * Add new export + lowering docs, update getting started (#8412) Write new top-level export and lowering documentation * More doc placeholders (#8523) * Move cmake and faq docs to new location * Rename CMake build to Building from Source * Move backend docs to new locations (#8413) * Temporarily remove new backend pages * Move backend docs to new locations * Update backend titles and inline contents * Backend doc template (#8524) Add backend template, update XNNPACK docs * Add runtime integration documentation (#8516) Add runtime integration doc * Move iOS docs to top, add Android placeholders (#8511) * Temporarily remove using-executorch-ios.md * Move Apple runtime docs to new location * Clean up documentation placeholders and links, add top-level docs for C++ APIs, Android, and troubleshooting (#8618) * Clean up getting-started.md, remove placeholders * Move Android pre-built AAR info into top-level Android page * Add placeholder backend overview * Add placeholder troubleshooting docs * Populate top-level C++ API doc * Clean up additional doc placeholders and fix broken links * Add env setup instructions for source build * Fix getting started code snippet (#8637) Fix quotes in getting started code snippets * Clean up a few more doc sections and links (#8672) Clean up a few more broken links and sections in new doc flow * Fix QNN link, typo (#8729) * Add a CMake snippet to the XNNPACK backend doc build section (#8730) Add CMake example to xnnpack backend doc
Summary
Update the Getting Started documentation, as part of the wider documentation revamp effort. See #8178 for more context on goals, motivation, and structure.
Note that this is a draft. There are a number of TODOs still present in markdown, as well as links to documentation that does not currently exist.
Test plan
See the documentation preview built for this PR.
cc @mergennachin @byjlw