Skip to content

Commit 2eec03e

Browse files
Document nightly wheels and linking macOS backends from C++ (pytorch#22240)
## Summary Two small documentation gaps for the pip wheel. **Nightly install.** New features land on the `main` branch and reach users through a nightly build before the next stable release. The getting-started guide only showed the stable install, so add the nightly command: ``` pip install executorch --pre --extra-index-url https://download.pytorch.org/whl/nightly/cpu ``` **Linking macOS backends from C++.** The C++ guide showed how to link a backend using XNNPACK as the example, but never showed the macOS Core ML and MLX delegates. Add a short example that links both, and state that registration is automatic: each backend registers itself through a static initializer, and its CMake target already carries the link options that keep that initializer from being dropped, so a consumer does not need any force-load flag. ## Test plan Documentation only. Reviewed the rendered Markdown and confirmed the install command and the CMake snippet match the wheel's CMake package. Co-authored-by: PyTorch Bot <pytorchbot@users.noreply.github.com>
1 parent 41db862 commit 2eec03e

2 files changed

Lines changed: 23 additions & 0 deletions

File tree

‎docs/source/getting-started.md‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,14 @@ This package includes the dependencies needed to export a PyTorch model, as well
2323
pip install executorch
2424
```
2525

26+
To get the latest features before they reach a stable release, install a nightly
27+
build instead. Nightly wheels are built from the `main` branch every day, so a
28+
change that has landed but is not yet in a stable release is available there first.
29+
30+
```
31+
pip install executorch --pre --extra-index-url https://download.pytorch.org/whl/nightly/cpu
32+
```
33+
2634
To build the framework from source, see [Building From Source](using-executorch-building-from-source.md). Backend delegates may require additional dependencies. See the appropriate backend documentation for more information.
2735

2836
> **_NOTE:_** On Windows, ExecuTorch requires a [Visual Studio Developer Powershell](https://learn.microsoft.com/en-us/visualstudio/ide/reference/command-prompt-powershell?view=vs-2022). Running from outside of a developer prompt will manifest as errors related to CL.exe.

‎docs/source/using-executorch-cpp.md‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,21 @@ foreach(_component
199199
endforeach()
200200
```
201201

202+
On macOS the Core ML and MLX delegates link the same way, by naming their
203+
component. Registration is handled for you: each backend registers itself through
204+
a static initializer, and the imported target carries the link options that keep
205+
that initializer from being dropped, so you do not need `-force_load` or any
206+
whole-archive flag of your own.
207+
208+
```cmake
209+
find_package(executorch REQUIRED COMPONENTS kernels_optimized backend_coreml backend_mlx)
210+
211+
target_link_libraries(app PRIVATE executorch::runtime
212+
executorch::kernels_optimized
213+
executorch::backend_coreml
214+
executorch::backend_mlx)
215+
```
216+
202217
Profiling a Core ML model records `DELEGATE_CALL`, which tells you how long the delegate ran in
203218
total. It does not record the individual operators inside the delegate, because that detail comes
204219
from the Core ML developer tools sources, and the wheel does not build them. An XNNPACK model

0 commit comments

Comments
 (0)