Open Wangbk-dl opened 5 months ago
Did you set the environment correctly?
$QNN_SDK_ROOT refers to the root of Qualcomm AI Engine Direct SDK, i.e., the directory containing QNN_README.txt.
$ANDROID_NDK refers to the root of Android NDK.
$EXECUTORCH_ROOT refers to the root of executorch git repository.
also, did you run
https://github.com/pytorch/executorch/blob/main/backends/qualcomm/scripts/build.sh
Try this version of QNN SDK: 2.20.0.240223. The older version may miss that file.
I follow the instruction in https://pytorch.org/executorch/main/build-run-qualcomm-ai-engine-direct-backend.html and finish the following steps:
cd $EXECUTORCH_ROOT
mkdir build_android
cd build_android
cmake .. \ -DBUCK2=buck2 \ -DCMAKE_INSTALL_PREFIX=$PWD \ -DEXECUTORCH_BUILD_QNN=ON \ -DQNN_SDK_ROOT=$QNN_SDK_ROOT \ -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK/build/cmake/android.toolchain.cmake \ -DANDROID_ABI='arm64-v8a' \ -DANDROID_NATIVE_API_LEVEL=23 \ -B$PWD
But when I run the
cmake --build $PWD -j16 --target install
I met the problem as followed:
/home/wbk/new_disk/executorch/backends/qualcomm/runtime/backends/htpbackend/HtpContextCustomConfig.h:17:10: fatal error: HTP/QnnHtpContext.h: No such file or directory 17 | #include "HTP/QnnHtpContext.h" | ^~~~~~~~~~~~~~~~~~~~~ compilation terminated. In file included from /home/wbk/new_disk/executorch/backends/qualcomm/runtime/backends/htpbackend/HtpContext.h:13, from /home/wbk/new_disk/executorch/backends/qualcomm/runtime/backends/htpbackend/HtpContext.cpp:10: /home/wbk/new_disk/executorch/backends/qualcomm/runtime/backends/htpbackend/HtpContextCustomConfig.h:17:10: fatal error: HTP/QnnHtpContext.h: No such file or directory 17 | #include "HTP/QnnHtpContext.h" | ^~~~~~~~~~~~~~~~~~~~~ compilation terminated.
I just cannot find the file HTP/QnnHtpContext.h. Could anyone help me with the problem?