Skip to content

Commit d4c0625

Browse files
larryliu0820dbort
authored andcommitted
Fix selective build broken links and format (#947)
Summary: Pull Request resolved: #947 As titled. Reviewed By: kirklandsign Differential Revision: D50289825 fbshipit-source-id: f834a844d6ec1d4560f28ece36bdc7f0b0f384c5
1 parent d1702f0 commit d4c0625

File tree

6 files changed

+9
-14
lines changed

6 files changed

+9
-14
lines changed

docs/source/concepts.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ An open-source, cross-platform family of tools designed to build, test and packa
6161

6262
## Codegen
6363

64-
In ExecuTorch, code generation is used to generate the [kernel registration library](./kernel-library-selective_build.md).
64+
In ExecuTorch, code generation is used to generate the [kernel registration library](./kernel-library-selective-build.md).
6565

6666
## [Core ATen Dialect](https://pytorch.org/docs/stable/torch.compiler_ir.html#irs)
6767

@@ -271,7 +271,7 @@ The ExecuTorch runtime executes models on edge devices. It is responsible for pr
271271

272272
Software Development Kit. The tooling users need to profile, debug and visualize programs that are running with ExecuTorch.
273273

274-
## [Selective build](./kernel-library-selective_build.md)
274+
## [Selective build](./kernel-library-selective-build.md)
275275

276276
An API used to build a leaner runtime by linking only to kernels used by the program. This provides significant binary size savings.
277277

docs/source/getting-started-architecture.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ Finally, the emitted program can be serialized to [flatbuffer](https://github.co
8181

8282
With the serialized program, and provided kernel libraries (for operator calls) or backend libraries (for delegate calls), model deployment engineers can now prepare the program for the runtime.
8383

84-
ExecuTorch has the _[selective build](./kernel-library-selective_build.md)_ APIs, to build the runtime that links to only kernels used by the program, which can provide significant binary size savings in the resulting application.
84+
ExecuTorch has the _[selective build](./kernel-library-selective-build.md)_ APIs, to build the runtime that links to only kernels used by the program, which can provide significant binary size savings in the resulting application.
8585

8686

8787
## Program Execution

docs/source/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ Topics in this section will help you get started with ExecuTorch.
162162

163163
kernel-library-overview
164164
kernel-library-custom-aten-kernel
165-
kernel-library-selective_build
165+
kernel-library-selective-build
166166

167167
.. toctree::
168168
:glob:

docs/source/kernel-library-selective_build.md renamed to docs/source/kernel-library-selective-build.md

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ _Selective build_ is a build mode on ExecuTorch that uses model metadata to guid
44

55
This document aims to help ExecuTorch users better use selective build, by listing out available APIs, providing an overview of high level architecture and showcasing examples.
66

7-
Preread: Overview of the ExecuTorch runtime, High-level architecture and components of ExecuTorch
7+
Preread: [Overview of the ExecuTorch runtime](./runtime-overview.md), [High-level architecture and components of ExecuTorch](./getting-started-architecture.md)
88

99

1010
## Design Principles
@@ -13,14 +13,14 @@ Preread: Overview of the ExecuTorch runtime, High-level architecture and compone
1313

1414
**What are we selecting?** Our core ExecuTorch library is around 50kB with no operators/kernels or delegates. If we link in kernel libraries such as the ExecuTorch in-house portable kernel library, the binary size of the whole application surges, due to unused kernels being registered into the ExecuTorch runtime. Selective build is able to apply a filter on the kernel libraries, so that only the kernels actually being used are linked, thus reducing the binary size of the application.
1515

16-
**How do we select? **Selective build provides APIs to allow users to pass in _op info_, operator metadata derived from target models. Selective build tools will gather these op info and build a filter for all kernel libraries being linked in.
16+
**How do we select?** Selective build provides APIs to allow users to pass in _op info_, operator metadata derived from target models. Selective build tools will gather these op info and build a filter for all kernel libraries being linked in.
1717

1818

1919
## High Level Architecture
2020

2121

2222

23-
![](./_static/img/kernel-library-selective_build.png)
23+
![](./_static/img/kernel-library-selective-build.png)
2424

2525

2626
Note that all of the selective build tools are running at build-time (to be distinguished from compile-time or runtime). Therefore selective build tools only have access to static data from user input or models.
@@ -56,19 +56,14 @@ If this input is set to true, it means we are registering all the kernels from a
5656

5757
### Select ops from schema yaml
5858

59-
Context: each kernel library is designed to have a yaml file associated with it. For more information on this yaml file, see here (TODO: add link to kernel library documentation). This API allows users to pass in the schema yaml for a kernel library directly, effectively allowlisting all kernels in the library to be registered.
59+
Context: each kernel library is designed to have a yaml file associated with it. For more information on this yaml file, see [Kernel Library Overview](./kernel-library-overview.md). This API allows users to pass in the schema yaml for a kernel library directly, effectively allowlisting all kernels in the library to be registered.
6060

6161

6262
### Select root ops from operator list
6363

6464
This API lets users pass in a list of operator names. Note that this API can be combined with the API above and we will create a allowlist from the union of both API inputs.
6565

6666

67-
### Select from model (WIP)
68-
69-
This API takes a model and extracts all op info from it.
70-
71-
7267
## Example Walkthrough
7368

7469

examples/portable/custom_ops/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,4 @@ et_operator_library(
5858

5959
We then let the custom ops library depend on this target, to only register the ops we want.
6060

61-
For more information about selective build, please refer to [`selective_build.md`](../../../docs/source/kernel-library-selective_build.md).
61+
For more information about selective build, please refer to [`selective_build.md`](../../../docs/source/kernel-library-selective-build.md).

0 commit comments

Comments
 (0)