You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update cmake docs to reflect the recommended way of running cmake (#6329)
* Update cmake docs to reflect the latest recommended way of running
cmake
Summary: Update the library name and make the cmake command a bit better
Test Plan:
Reviewers:
Subscribers:
Tasks:
Tags:
* Point to release/0.4 sources
Summary:
Test Plan:
Reviewers:
Subscribers:
Tasks:
Tags:
Copy file name to clipboardExpand all lines: docs/source/runtime-build-and-cross-compilation.md
+10-13
Original file line number
Diff line number
Diff line change
@@ -12,8 +12,8 @@ likely to be useful to embedded systems users.
12
12
-`libexecutorch.a`: The core of the ExecuTorch runtime. Does not contain any
13
13
operator/kernel definitions or backend definitions.
14
14
-`libportable_kernels.a`: The implementations of ATen-compatible operators,
15
-
following the signatures in `//kernels/portable/functions.yaml`.
16
-
-`libportable_kernels_bindings.a`: Generated code that registers the contents
15
+
following the signatures in `[functions.yaml](https://github.com/pytorch/executorch/blob/release/0.4/kernels/portable/functions.yaml)`.
16
+
-`libportable_ops_lib.a`: Generated code that registers the contents
17
17
of `libportable_kernels.a` with the runtime.
18
18
- NOTE: This must be linked into your application with a flag like
19
19
`-Wl,-force_load` or `-Wl,--whole-archive`. It contains load-time functions
@@ -43,9 +43,9 @@ dependencies may have changed.
43
43
# cd to the root of the executorch repo
44
44
cd executorch
45
45
46
-
# Clean and configure the CMake build system. It's good practice to do this
46
+
# Clean cmake cache directory (cmake-out). It's a good practice to do this
Once this is done, you don't need to do it again until you pull from the upstream repo again, or if you modify any CMake-related files.
@@ -54,28 +54,25 @@ Once this is done, you don't need to do it again until you pull from the upstrea
54
54
55
55
The release build offers optimizations intended to improve performance and reduce binary size. It disables program verification and executorch logging, and adds optimizations flags.
56
56
```bash
57
-
-DCMAKE_BUILD_TYPE=Release
57
+
CMAKE_FLAGS="-DCMAKE_BUILD_TYPE=Release"
58
58
```
59
59
60
-
To further optimize the release build for size, use both:
60
+
To further optimize the release build for size, add:
61
61
```bash
62
-
-DCMAKE_BUILD_TYPE=Release \
63
-
-DOPTIMIZE_SIZE=ON
62
+
CMAKE_FLAGS="$CMAKE_FLAGS -DOPTIMIZE_SIZE=ON"
64
63
```
65
64
66
-
See [CMakeLists.txt](https://github.com/pytorch/executorch/blob/main/CMakeLists.txt)
65
+
See [CMakeLists.txt](https://github.com/pytorch/executorch/blob/release/0.4/CMakeLists.txt)
67
66
68
67
## Build the runtime components
69
68
70
69
Build all targets with
71
70
72
71
```bash
73
-
# cd to the root of the executorch repo
74
-
cd executorch
75
-
76
72
# Build using the configuration that you previously generated under the
77
73
# `cmake-out` directory.
78
-
#
74
+
cmake "$CMAKE_FLAGS" -Bcmake-out .
75
+
79
76
# NOTE: The `-j` argument specifies how many jobs/processes to use when
80
77
# building, and tends to speed up the build significantly. It's typical to use
0 commit comments