Open shubhamnake23 opened 2 weeks ago
@cccclai for QNN
Have you tried running this script instead?
sh backends/qualcomm/scripts/build.sh
@cccclai I got same errors and the script didn't work.
Have you tried running this script instead?
sh backends/qualcomm/scripts/build.sh
It looks like the sdk build part is failing. Can you try -DEXECUTORCH_BUILD_SDK=OFF
? Or change it in the CmakeCache.txt
directly
Hi @allzero-kwon , please add target_link_options(qnn_executor_runner PUBLIC -fsanitize=undefined)
to the end of examples/qualcomm/CMakeLists.txt
@allzero-kwon does the previous suggestion solve your issue?
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
build executorch & qnn_executorch_backend
cmake .. \ -DCMAKE_INSTALL_PREFIX=$PWD \ -DEXECUTORCH_BUILD_SDK=ON \ -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
cmake --build $PWD -j16 --target install
cmake ../examples/qualcomm \ -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK/build/cmake/android.toolchain.cmake \ -DANDROID_ABI='arm64-v8a' \ -DANDROID_NATIVE_API_LEVEL=23 \ -DCMAKE_PREFIX_PATH="$PWD/lib/cmake/ExecuTorch;$PWD/third-party/gflags;" \ -DCMAKE_FIND_ROOT_PATH_MODE_PACKAGE=BOTH \ -Bexamples/qualcomm
But when I run the: cmake --build examples/qualcomm -j16
I met the problem as followed: ld: error: undefined symbol: __ubsan_handle_type_mismatch_v1
ld: error: undefined symbol: __ubsan_handle_divrem_overflow
ld: error: undefined symbol: __ubsan_handle_pointer_overflow
ld: error: undefined symbol: __ubsan_handle_out_of_bounds
ld: error: undefined symbol: __ubsan_handle_builtin_unreachable
ld: error: undefined symbol: __ubsan_handle_add_overflow
ld: error: undefined symbol: __ubsan_handle_sub_overflow
ld: error: undefined symbol: __ubsan_handle_shift_out_of_bounds
ld: error: undefined symbol: __ubsan_handle_negate_overflow