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
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,13 +54,12 @@ 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
65
See [CMakeLists.txt](https://github.com/pytorch/executorch/blob/main/CMakeLists.txt)
@@ -70,12 +69,10 @@ See [CMakeLists.txt](https://github.com/pytorch/executorch/blob/main/CMakeLists.
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
81
78
# "core count + 1" as the `-j` value.
@@ -104,7 +101,7 @@ I 00:00:00.000612 executorch:executor_runner.cpp:138] Setting up planned buffer
104
101
I 00:00:00.000669 executorch:executor_runner.cpp:161] Method loaded.
105
102
I 00:00:00.000685 executorch:executor_runner.cpp:171] Inputs prepared.
106
103
I 00:00:00.000764 executorch:executor_runner.cpp:180] Model executed successfully.
107
-
I 00:00:00.000770 executorch:executor_runner.cpp:184] 1 outputs:
104
+
I 00:00:00.000770 executorch:executor_runner.cpp:184] 1 outputs:
0 commit comments