@@ -115,8 +115,12 @@ Python APIs on x64 are required to compile models to Qualcomm AI Engine Direct b
115
115
116
116
``` bash
117
117
cd $EXECUTORCH_ROOT
118
- mkdir build_x86_64
119
- cd build_x86_64
118
+ # Workaround for fbs files in exir/_serialize
119
+ cp schema/program.fbs exir/_serialize/program.fbs
120
+ cp schema/scalar_type.fbs exir/_serialize/scalar_type.fbs
121
+
122
+ mkdir cmake_out
123
+ cd cmake_out
120
124
cmake .. -DEXECUTORCH_BUILD_QNN=ON -DQNN_SDK_ROOT=${QNN_SDK_ROOT}
121
125
cmake --build . -t " PyQnnManagerAdaptor" " PyQnnWrapperAdaptor" -j8
122
126
@@ -134,12 +138,12 @@ Commands to build `qnn_executor_runner` for Android:
134
138
135
139
``` bash
136
140
cd $EXECUTORCH_ROOT
137
- mkdir build_android
138
- cd build_android
141
+ mkdir cmake_android_out
142
+ cd cmake_android_out
139
143
# build executorch & qnn_executorch_backend
140
144
cmake .. \
141
- -DBUCK2=buck2 \
142
145
-DCMAKE_INSTALL_PREFIX=$PWD \
146
+ -DEXECUTORCH_BUILD_SDK=ON \
143
147
-DEXECUTORCH_BUILD_QNN=ON \
144
148
-DQNN_SDK_ROOT=$QNN_SDK_ROOT \
145
149
-DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK /build/cmake/android.toolchain.cmake \
@@ -162,7 +166,7 @@ cmake --build examples/qualcomm -j16
162
166
163
167
** Note:** If you want to build for release, add ` -DCMAKE_BUILD_TYPE=Release ` to the ` cmake ` command options.
164
168
165
- You can find ` qnn_executor_runner ` under ` build_android /examples/qualcomm/` .
169
+ You can find ` qnn_executor_runner ` under ` cmake_android_out /examples/qualcomm/` .
166
170
167
171
168
172
## Deploying and running on device
@@ -174,7 +178,7 @@ We use deeplab-v3-resnet101 as an example in this tutorial. Run below commands t
174
178
175
179
```
176
180
cd $EXECUTORCH_ROOT
177
- python -m examples.qualcomm.scripts.deeplab_v3 -b build_android -m SM8550 --compile_only --download
181
+ python -m examples.qualcomm.scripts.deeplab_v3 -b cmake_android_out -m SM8550 --compile_only --download
178
182
```
179
183
180
184
You might see something like below:
@@ -219,7 +223,8 @@ So, we can run `qnn_executor_runner` like
219
223
220
224
``` bash
221
225
adb push ./deeplab_v3/dlv3_qnn.pte ${DEVICE_DIR}
222
- adb push ${EXECUTORCH_ROOT} /build_android/examples/qualcomm/qnn_executor_runner ${DEVICE_DIR}
226
+ adb push ${EXECUTORCH_ROOT} /cmake_android_out/examples/qualcomm/qnn_executor_runner ${DEVICE_DIR}
227
+ adb push ${EXECUTORCH_ROOT} /cmake_android_out/lib/libqnn_executorch_backend.so ${DEVICE_DIR}
223
228
adb shell " cd ${DEVICE_DIR} \
224
229
&& export LD_LIBRARY_PATH=${DEVICE_DIR} \
225
230
&& export ADSP_LIBRARY_PATH=${DEVICE_DIR} \
0 commit comments