Hi,
I try to convert GPT-NEO ONNX model to model.cpp with qnn-onnx-convert tool. But trigger failed:
KeyError: 'Graph has no buffer 1239, referred to as input for split_0'
2023-07-11 15:18:48,710 - 209 - ERROR - Node : 'Graph has no buffer 1239, referred to as input for split_0'
After debug, I found the root cause is onnxsim will add new split OP after optimized. But convert tool can't handle the new OP with parameters. The buffer issue will be triggered as above.
DEBUG: [MatMul]
['/transformer/h.0/ln_1/Add_1_output_0', '1234']
['1235']
DEBUG: [Split]
['1235', '1239']
['1236', '1237', '1238']
DEBUG: [Reshape]
['1236', '/transformer/h.0/attn/attention/Concat_output_0']
['/transformer/h.0/attn/attention/Reshape_output_0']
DEBUG: [Transpose]
['/transformer/h.0/attn/attention/Reshape_output_0']
['/transformer/h.0/attn/attention/Transpose_output_0']
DEBUG: [Reshape]
['1237', '/transformer/h.0/attn/attention/Concat_output_0']
['/transformer/h.0/attn/attention/Reshape_1_output_0']
DEBUG: [Reshape]
['1238', '/transformer/h.0/attn/attention/Concat_output_0']
['/transformer/h.0/attn/attention/Reshape_2_output_0']
DEBUG: [Transpose]
['/transformer/h.0/attn/attention/Reshape_2_output_0']
['/transformer/h.0/attn/attention/Transpose_2_output_0']
If add parameter "-n", the convert tool will work ok with original model structure. But maybe the convert tool should have the feature that handle new add OP after onnxsim optimized.
Test SDK version: qnn-2.11.0/2.12.0, snpe-2.11.0
Thanks.
Dear developer,
Could you please share the model with us, and we will test the model to find the reason for you.
BR.
Yunxiang
Hi Yunxiang,
The model is about 600MB. Is there any data server can be used to share the model ?
Regards
Xingwei
Dear developer,
You can push the model to github and I will pull it locally.
BR.
Yunxiang