You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
RWKV-6 模型转换报错 The input tensor cannot be reshaped to the requested shape. Input shape:{1,2048,1,1}, requested shape:{1,32,64,64} (rknn-toolkit2 v2.2.0)
#169
Open
happyme531 opened this issue
Oct 9, 2024
· 2 comments
...
D convert_exmatmul_to_conv: remove node = ['/blocks.23/ffn_key/MatMul'], add node = ['/blocks.23/ffn_key/MatMul']
D convert_exmatmul_to_conv: remove node = ['/head/MatMul'], add node = ['/head/MatMul']
D fold_constant ...
I FoldConstant : 0%| | 0/1885 [00:00<?, ?it/s]2024-10-09 20:55:45.093023561 [E:onnxruntime:, sequential_executor.cc:514 ExecuteKernel] Non-zero status code returned while running Reshape node. Name:'/blocks.0/MatMul_4_output_0_mm-rs' Status Message: /onnxruntime_src/onnxruntime/core/providers/cpu/tensor/reshape_helper.h:44 onnxruntime::ReshapeHelper::ReshapeHelper(const onnxruntime::TensorShape&, onnxruntime::TensorShapeVector&, bool) input_shape_size == size was false. The input tensor cannot be reshaped to the requested shape. Input shape:{1,2048,1,1}, requested shape:{1,32,64,64}
I FoldConstant : 2%|▊ | 40/1885 [00:00<00:04, 429.97it/s]
E build: Traceback (most recent call last):
File "rknn/api/rknn_log.py", line 309, in rknn.api.rknn_log.error_catch_decorator.error_catch_wrapper
File "rknn/api/rknn_base.py", line 1936, in rknn.api.rknn_base.RKNNBase.build
File "rknn/api/graph_optimizer.py", line 2204, in rknn.api.graph_optimizer.GraphOptimizer.fuse_ops
File "rknn/api/graph_optimizer.py", line 976, in rknn.api.graph_optimizer.GraphOptimizer.fold_constant
File "rknn/api/session.py", line 150, in rknn.api.session.Session.run
File "/home/zt/.conda/envs/rknn/lib/python3.8/site-packages/onnxruntime/capi/onnxruntime_inference_collection.py", line 220, in run
return self._sess.run(output_names, input_feed, run_options)
onnxruntime.capi.onnxruntime_pybind11_state.RuntimeException: [ONNXRuntimeError] : 6 : RUNTIME_EXCEPTION : Non-zero status code returned while running Reshape node. Name:'/blocks.0/MatMul_4_output_0_mm-rs' Status Message: /onnxruntime_src/onnxruntime/core/providers/cpu/tensor/reshape_helper.h:44 onnxruntime::ReshapeHelper::ReshapeHelper(const onnxruntime::TensorShape&, onnxruntime::TensorShapeVector&, bool) input_shape_size == size was false. The input tensor cannot be reshaped to the requested shape. Input shape:{1,2048,1,1}, requested shape:{1,32,64,64}
W build: ===================== WARN(11) =====================
E rknn-toolkit2 version: 2.2.0
Traceback (most recent call last):
File "rknn/api/rknn_log.py", line 309, in rknn.api.rknn_log.error_catch_decorator.error_catch_wrapper
File "rknn/api/rknn_base.py", line 1936, in rknn.api.rknn_base.RKNNBase.build
File "rknn/api/graph_optimizer.py", line 2204, in rknn.api.graph_optimizer.GraphOptimizer.fuse_ops
File "rknn/api/graph_optimizer.py", line 976, in rknn.api.graph_optimizer.GraphOptimizer.fold_constant
File "rknn/api/session.py", line 150, in rknn.api.session.Session.run
File "/home/zt/.conda/envs/rknn/lib/python3.8/site-packages/onnxruntime/capi/onnxruntime_inference_collection.py", line 220, in run
return self._sess.run(output_names, input_feed, run_options)
onnxruntime.capi.onnxruntime_pybind11_state.RuntimeException: [ONNXRuntimeError] : 6 : RUNTIME_EXCEPTION : Non-zero status code returned while running Reshape node. Name:'/blocks.0/MatMul_4_output_0_mm-rs' Status Message: /onnxruntime_src/onnxruntime/core/providers/cpu/tensor/reshape_helper.h:44 onnxruntime::ReshapeHelper::ReshapeHelper(const onnxruntime::TensorShape&, onnxruntime::TensorShapeVector&, bool) input_shape_size == size was false. The input tensor cannot be reshaped to the requested shape. Input shape:{1,2048,1,1}, requested shape:{1,32,64,64}
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "./convert_rknn.py", line 47, in <module>
ret = rknn.build(do_quantization=QUANTIZE, dataset=DATASET, rknn_batch_size=None)
File "/home/zt/.conda/envs/rknn/lib/python3.8/site-packages/rknn/api/rknn.py", line 192, in build
return self.rknn_base.build(do_quantization=do_quantization, dataset=dataset, expand_batch_size=rknn_batch_size)
File "rknn/api/rknn_log.py", line 314, in rknn.api.rknn_log.error_catch_decorator.error_catch_wrapper
File "rknn/api/rknn_log.py", line 95, in rknn.api.rknn_log.RKNNLog.e
ValueError: Traceback (most recent call last):
File "rknn/api/rknn_log.py", line 309, in rknn.api.rknn_log.error_catch_decorator.error_catch_wrapper
File "rknn/api/rknn_base.py", line 1936, in rknn.api.rknn_base.RKNNBase.build
File "rknn/api/graph_optimizer.py", line 2204, in rknn.api.graph_optimizer.GraphOptimizer.fuse_ops
File "rknn/api/graph_optimizer.py", line 976, in rknn.api.graph_optimizer.GraphOptimizer.fold_constant
File "rknn/api/session.py", line 150, in rknn.api.session.Session.run
File "/home/zt/.conda/envs/rknn/lib/python3.8/site-packages/onnxruntime/capi/onnxruntime_inference_collection.py", line 220, in run
return self._sess.run(output_names, input_feed, run_options)
onnxruntime.capi.onnxruntime_pybind11_state.RuntimeException: [ONNXRuntimeError] : 6 : RUNTIME_EXCEPTION : Non-zero status code returned while running Reshape node. Name:'/blocks.0/MatMul_4_output_0_mm-rs' Status Message: /onnxruntime_src/onnxruntime/core/providers/cpu/tensor/reshape_helper.h:44 onnxruntime::ReshapeHelper::ReshapeHelper(const onnxruntime::TensorShape&, onnxruntime::TensorShapeVector&, bool) input_shape_size == size was false. The input tensor cannot be reshaped to the requested shape. Input shape:{1,2048,1,1}, requested shape:{1,32,64,64}
看起来是图优化器的问题。
The text was updated successfully, but these errors were encountered:
模型和转换脚本和 #168 中的相同,toolkit2版本升级到v2.2.0之后又开始报另一个错误:
看起来是图优化器的问题。
The text was updated successfully, but these errors were encountered: