From 5c57cd1a3c38f6a6fc86b5bc4426f75f30ae2551 Mon Sep 17 00:00:00 2001 From: cccclai Date: Thu, 25 Sep 2025 10:29:37 -0700 Subject: [PATCH] Documentation polishing related to delegates (#14551) Summary: 1. backend-delegates-dependencies.md - fix typos 2. backend-delegates-integration.md - a bit polishing, use bullet point instead of plain text 3. debug-backend-delegate.md - use a real model so users can copy paste, also adapt to the API changes Differential Revision: D83186517 (cherry picked from commit a0e1395d6da8130cf3853da311a3866b658545a3) --- docs/source/backend-delegates-dependencies.md | 2 +- docs/source/backend-delegates-integration.md | 21 +- docs/source/debug-backend-delegate.md | 603 +++++++++++++++++- 3 files changed, 586 insertions(+), 40 deletions(-) diff --git a/docs/source/backend-delegates-dependencies.md b/docs/source/backend-delegates-dependencies.md index f2068989bd2..06f23ca36bc 100644 --- a/docs/source/backend-delegates-dependencies.md +++ b/docs/source/backend-delegates-dependencies.md @@ -49,7 +49,7 @@ for these third-party dependencies. `executorch/third-party` then try to use that if possible. This helps with reducing the binary size when the delegate is enabled. * The rest of the ExecuTorch code, outside of the delegate, should not depend on - this. And it should should build and run correctly without this dependency + this. And it should build and run correctly without this dependency when the delegate is disabled at build time. More details in the section [below](#runtime-dependencies). diff --git a/docs/source/backend-delegates-integration.md b/docs/source/backend-delegates-integration.md index 0179ceff872..130da0d3225 100644 --- a/docs/source/backend-delegates-integration.md +++ b/docs/source/backend-delegates-integration.md @@ -23,12 +23,13 @@ the top level ExecuTorch package. For third-party dependencies, please refer to At a minimum, a delegate must provide CMake support for building its C++ sources. -For the CMake setup, the delegate dir should be included by the -top level `CMakeLists.txt` file using `add_subdirectory` CMake command, and -should be built conditionally with an ExecuTorch build flag like -`EXECUTORCH_BUILD_`, see `EXECUTORCH_BUILD_XNNPACK` for example. -For third-party dependencies, please refer to -[this](backend-delegates-dependencies.md). +For the CMake setup: + +- The delegate directory should be included by the top-level `CMakeLists.txt` file using the `add_subdirectory` command. +- It should be built conditionally using an ExecuTorch build flag like `EXECUTORCH_BUILD_`. +(See `EXECUTORCH_BUILD_XNNPACK` for an example.) + +For third-party dependencies, please refer to [this](backend-delegates-dependencies.md).