Skip to content

Commit b87a9d6

Browse files
committed
bugbash
1 parent 76b08f3 commit b87a9d6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

docs/source/using-executorch-cpp.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ In order to support a wide variety of devices, from high-end mobile phones down
66

77
The C++ `Module` class provides the high-level interface to load and execute a model from C++. It is responsible for loading the .pte file, configuring memory allocation and placement, and running the model. The Module constructor takes a file path and provides a simplified `forward()` method to run the model.
88

9-
In addition the Module class, the tensor extension provides an encapsulated interface to define and manage tensor memory. It provides the `TensorPtr` class, which is a "fat" smart pointer. It provides ownership over the tensor data and metadata, such as size and strides. The `make_tensor_ptr` and `from_blob` methods, defined in `tensor.h`, provide owning and non-owning tensor creation APIs, respectively.
9+
In addition to the Module class, the tensor extension provides an encapsulated interface to define and manage tensor memory. It provides the `TensorPtr` class, which is a "fat" smart pointer. It provides ownership over the tensor data and metadata, such as size and strides. The `make_tensor_ptr` and `from_blob` methods, defined in `tensor.h`, provide owning and non-owning tensor creation APIs, respectively.
1010

1111
```cpp
1212
#include <executorch/extension/module/module.h>
@@ -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 `extension_module_static`, `extension_module_flat_tensor`, if desired. Note that `extension_module` depends on `extension_flat_tensor` for [program-data separation](ptd-file-format.md) support, so make sure to include that too.
4444
4545
```
4646
# CMakeLists.txt
@@ -50,6 +50,7 @@ target_link_libraries(
5050
my_target
5151
PRIVATE executorch
5252
extension_module_static
53+
extension_flat_tensor
5354
extension_tensor
5455
optimized_native_cpu_ops_lib
5556
xnnpack_backend)

0 commit comments

Comments
 (0)