Skip to content

Commit ac7fff8

Browse files
committed
Update docs to use top-level CMake targets
ghstack-source-id: 9877dbf ghstack-comment-id: 3111967018 Pull-Request: #12807
1 parent fcdd7da commit ac7fff8

File tree

2 files changed

+15
-5
lines changed

2 files changed

+15
-5
lines changed

docs/source/using-executorch-building-from-source.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,17 @@ I 00:00:00.000764 executorch:executor_runner.cpp:180] Model executed successfull
252252
I 00:00:00.000770 executorch:executor_runner.cpp:184] 1 outputs:
253253
Output 0: tensor(sizes=[1], [2.])
254254
```
255+
256+
### CMake Targets
257+
258+
To link against the ExecuTorch framework from CMake, the following top-level targets are exposed:
259+
260+
* `executorch_backends`: Contains all configured backends.
261+
* `executorch_extensions`: Contains all configured extensions.
262+
* `executorch_kernels`: Contains all configured kernel libraries.
263+
264+
The backends, extensions, and kernels included in these targets are controlled by the various `EXECUTORCH_` CMake options specified by the build.
265+
255266
## Build ExecuTorch for Windows
256267
257268
This document outlines the current known working build instructions for building and validating ExecuTorch on a Windows machine.

docs/source/using-executorch-cpp.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Running a model using the low-level runtime APIs allows for a high-degree of con
4040
4141
## Building with CMake
4242
43-
ExecuTorch uses CMake as the primary build system. Inclusion of the module and tensor APIs are controlled by the `EXECUTORCH_BUILD_EXTENSION_MODULE` and `EXECUTORCH_BUILD_EXTENSION_TENSOR` CMake options. As these APIs may not be supported on embedded systems, they are disabled by default when building from source. The low-level API surface is always included. To link, add the `executorch` target as a CMake dependency, along with `extension_module_static` and `extension_tensor`, if desired.
43+
ExecuTorch uses CMake as the primary build system. Inclusion of the module and tensor APIs are controlled by the `EXECUTORCH_BUILD_EXTENSION_MODULE` and `EXECUTORCH_BUILD_EXTENSION_TENSOR` CMake options. As these APIs may not be supported on embedded systems, they are disabled by default when building from source. The low-level API surface is always included. To link, add the `executorch` target as a CMake dependency, along with `executorch_backends`, `executorch_extensions`, and `extension_kernels`, to link all configured backends, extensions, and kernels.
4444
4545
```
4646
# CMakeLists.txt
@@ -49,10 +49,9 @@ add_subdirectory("executorch")
4949
target_link_libraries(
5050
my_target
5151
PRIVATE executorch
52-
extension_module_static
53-
extension_tensor
54-
optimized_native_cpu_ops_lib
55-
xnnpack_backend)
52+
executorch_backends
53+
executorch_extensions
54+
executorch_kernels)
5655
```
5756
5857
See [Building from Source](using-executorch-building-from-source.md) for more information on the CMake build process.

0 commit comments

Comments
 (0)