Hi Qualcomm guys,
I am trying to quantize and convert 3B Llama model for mobile device with Snapdragon 8 Gen 3, but I ended up being caught by an error while I was running 'qnn-model-lib-generator' tool.
With onnx model that I got with AIMET's calibration process as input, I ran `qnn-onnx-converter`. As a result, I got a pair of .cpp, and .bin files, so far so good.
However, when I tried to run `qnn-model-lib-generator` with the .cpp, .bin files as input, it stops running with the following error:
/usr/bin/../lib/gcc/x86_64-linux-gnu/9/crtbeginS.o: in function `deregister_tm_clones':crtstuff.c:(.text+0x3): relocation truncated to fit: R_X86_64_PC32 against `.tm_clone_table'crtstuff.c:(.text+0xa): relocation truncated to fit: R_X86_64_PC32 against symbol `__TMC_END__' defined in .data section in libs/x86_64-linux-clang/lib3B-26L_1_of_1.so/usr/bin/../lib/gcc/x86_64-linux-gnu/9/crtbeginS.o: in function `register_tm_clones':crtstuff.c:(.text+0x33): relocation truncated to fit: R_X86_64_PC32 against `.tm_clone_table'crtstuff.c:(.text+0x3a): relocation truncated to fit: R_X86_64_PC32 against symbol `__TMC_END__' defined in .data section in libs/x86_64-linux-clang/lib3B-26L_1_of_1.so/usr/bin/../lib/gcc/x86_64-linux-gnu/9/crtbeginS.o: in function `__do_global_dtors_aux':crtstuff.c:(.text+0x76): relocation truncated to fit: R_X86_64_PC32 against `.bss'crtstuff.c:(.text+0x9e): relocation truncated to fit: R_X86_64_PC32 against `.bss'clang: error: linker command failed with exit code 1 (use -v to see invocation)make: *** [Makefile.linux-x86_64:104: libs/x86_64-linux-clang/lib3B-26L_1_of_1.so] Error 1
I googled with the error message, but with so few clues, I couldn't get a fine solution for this.
Can anybody help me deal with this error?
Hi,
can you share me the command you used for qnn-model-lib-generator.
```
(py310) PS C:\Qualcomm\AIStack\QAIRT\2.22.6.240515\bin\x86_64-windows-msvc> python qnn-model-lib-generator -c C:\Users\26671\Desktop\Qualcomm\best.cpp -b C:\Users\26671\Desktop\Qualcomm\best.bin -t aarch64-android -o model_libs --clean_up
```
I feel like my version is too new to support aarch64 android
```
(py310) PS C:\Qualcomm\AIStack\QAIRT\2.22.6.240515\bin\x86_64-windows-msvc> python qnn-model-lib-generator -c C:\Users\26671\Desktop\Qualcomm\best.cpp -b C:\Users\26671\Desktop\Qualcomm\best.bin -t aarch64-android -o model_libs --clean_up
```
I feel like my version is too new to support aarch64 android
```
(py310) PS C:\Qualcomm\AIStack\QAIRT\2.22.6.240515\bin\x86_64-windows-msvc> python qnn-model-lib-generator -c C:\Users\26671\Desktop\Qualcomm\best.cpp -b C:\Users\26671\Desktop\Qualcomm\best.bin -t aarch64-android -o model_libs --clean_up
```
I feel like my version is too new to support aarch64 android
Hi,
Can you try once by exporting the android_ndk_root path. Follow the below given steps.
$ export ANDROID_NDK_ROOT=android-ndk-r21c
$export PATH=${ANDROID_NDK_ROOT}:${PATH}
${QNN_SDK_ROOT}/bin/envcheck -n