Closed guoguo1314 closed 2 hours ago
看起来是的,请问有没有完整的日志?
有,来了。
(rwkv-qcm) (base) lyg@lyg-System-Product-Name:~/Codes/rwkv-qualcomm$ python convert_model.py /home/lyg/Pth/Rwkv/Rwkv-6-world-1.6b/RWKV-x060-World-1B6-v2.1-20240328-ctx4096.pth --chunks 4
/home/lyg/Codes/rwkv-qualcomm/rwkv_src/rwkv_model.py:80: FutureWarning: You are using torch.load
with weights_only=False
(the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value for weights_only
will be flipped to True
. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via torch.serialization.add_safe_globals
. We recommend you start setting weights_only=True
for any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature.
w = torch.load(args.MODEL_NAME + '.pth', map_location='cpu')
Model version: 6
n_layer: 24
n_embd: 2048
vocab_size: 65536
n_att: 2048
n_ffn: 7168
Chunk 0: layers 0 to 6
Chunk 1: layers 6 to 12
Chunk 2: layers 12 to 18
Chunk 3: layers 18 to 24
/home/lyg/Codes/rwkv-qualcomm/rwkv_src/rwkv_v6_modules.py:111: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
assert batch_size == 1
/home/lyg/Codes/rwkv-qualcomm/rwkv_src/rwkv_v6_modules.py:112: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
if seq_length == 1:
/home/lyg/Codes/rwkv-qualcomm/rwkv_src/rwkv_v6_modules.py:155: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
if seq_length == 1:
/home/lyg/Codes/rwkv-qualcomm/rwkv_src/rwkv_v6_modules.py:220: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
assert batch_size == 1
/home/lyg/Codes/rwkv-qualcomm/rwkv_src/rwkv_v6_modules.py:221: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
if seq_length == 1:
onnx model chunk0 saved to onnx/RWKV-x060-World-1B6-v2.1-20240328-ctx4096_chunk1of4/RWKV-x060-World-1B6-v2.1-20240328-ctx4096_chunk1of4.onnx
onnx model chunk1 saved to onnx/RWKV-x060-World-1B6-v2.1-20240328-ctx4096_chunk2of4/RWKV-x060-World-1B6-v2.1-20240328-ctx4096_chunk2of4.onnx
onnx model chunk2 saved to onnx/RWKV-x060-World-1B6-v2.1-20240328-ctx4096_chunk3of4/RWKV-x060-World-1B6-v2.1-20240328-ctx4096_chunk3of4.onnx
onnx model chunk3 saved to onnx/RWKV-x060-World-1B6-v2.1-20240328-ctx4096_chunk4of4/RWKV-x060-World-1B6-v2.1-20240328-ctx4096_chunk4of4.onnx
Converting and compiling QNN models...
/opt/qcom/aistack/qairt/2.26.0.240828/bin/x86_64-linux-clang/qnn-onnx-converter -i onnx/RWKV-x060-World-1B6-v2.1-20240328-ctx4096_chunk1of4/RWKV-x060-World-1B6-v2.1-20240328-ctx4096_chunk1of4.onnx --float_bw 32 --input_layout "state1_in" "NFC" --input_layout "state4_in" "NFC" --input_layout "state7_in" "NFC" --input_layout "state10_in" "NFC" --input_layout "state13_in" "NFC" --input_layout "state16_in" "NFC" --input_layout "in" "NFC"
Traceback (most recent call last):
File "/opt/qcom/aistack/qairt/2.26.0.240828/bin/x86_64-linux-clang/qnn-onnx-converter", line 12, in
Converting and compiling QNN models... /opt/qcom/aistack/qairt/2.26.0.240828/bin/x86_64-linux-clang/qnn-onnx-converter -i onnx/RWKV-x060-World-1B6-v2.1-20240328-ctx4096_chunk1of4/RWKV-x060-World-1B6-v2.1-20240328-ctx4096_chunk1of4.onnx --float_bw 32 --input_layout "state1_in" "NFC" --input_layout "state4_in" "NFC" --input_layout "state7_in" "NFC" --input_layout "state10_in" "NFC" --input_layout "state13_in" "NFC" --input_layout "state16_in" "NFC" --input_layout "in" "NFC" Traceback (most recent call last): File "/opt/qcom/aistack/qairt/2.26.0.240828/bin/x86_64-linux-clang/qnn-onnx-converter", line 12, in from qti.aisw.converters import onnx as onnx_frontend ModuleNotFoundError: No module named 'qti' Compiling QNN model library...
看起来好像是qairt的环境没装好
是装好了qnn的,是qnn的头文件问题,要在
/opt/qcom/aistack/qairt/2.26.0.240828/bin/x86_64-linux-clang/qnn-onnx-converter.py
添加
sys.path.append('/opt/qcom/aistack/qairt/2.26.0.240828/lib/python')
要不然python解释器找不到路径。
谢谢老哥。
是装好了qnn的,是qnn的头文件问题,要在 /opt/qcom/aistack/qairt/2.26.0.240828/bin/x86_64-linux-clang/qnn-onnx-converter.py 添加
sys.path.append('/opt/qcom/aistack/qairt/2.26.0.240828/lib/python')
要不然python解释器找不到路径。 谢谢老哥。
这么说来,是不是没有执行source ${QNN_SDK_ROOT}/bin/envsetup.sh
没有执行source ${QNN_SDK_ROOT}/bin/envsetup.sh,只是export了,export QNN_SDK_ROOT=/opt/qcom/aistack/qairt/2.26.0.240828。
没有执行source ${QNN_SDK_ROOT}/bin/envsetup.sh,只是export了,export QNN_SDK_ROOT=/opt/qcom/aistack/qairt/2.26.0.240828。
好的,谢谢老哥
qnn:2.26.0.240828 看样子是没有生成对应的cpp文件。