Closed roingbu closed 1 year ago
@roingbu 请提供一下报错信息 如果出现killed,可能是内存不足,可以增加虚拟内存再次进行尝试
warn: Nncase.Hosting.PluginLoader[0] NNCASE_PLUGIN_PATH is not set. Nncase.IR.Call -> slice: 1, layer: 69 dim2-> start: 0, end: 1, dim3-> start: 0, end: 1 warn: Nncase.Hosting.PluginLoader[0] NNCASE_PLUGIN_PATH is not set. munmap_chunk(): invalid pointer ./build_model.sh: line 7: 563 Aborted (core dumped) python3 ./scripts/yolov5s_onnx.py --target k230 --model models/yolov5s.onnx --dataset calibration_dataset warn: Nncase.Hosting.PluginLoader[0] NNCASE_PLUGIN_PATH is not set. ./build_model.sh: line 13: 602 Segmentation fault (core dumped) python3 scripts/yolov5s_onnx_simu.py --model models/yolov5s.onnx --model_input object_detect/data/input_fp32.bin --kmodel tmp/yolov5s_onnx/test.kmodel --kmodel_input object_detect/data/input_uint8.bin
我今天不适用docker生成文件了,不过也有了一下输出信息,有报错
warn: Nncase.Hosting.PluginLoader[0] NNCASE_PLUGIN_PATH is not set. warn: Nncase.Hosting.PluginLoader[0] NNCASE_PLUGIN_PATH is not set. ./scripts/yolov5s_onnx.py:23: DeprecationWarning:
mapping.TENSOR_TYPE_TO_NP_TYPE
is now deprecated and will be removed in a future release.To silence this warning, please usehelper.tensor_dtype_to_np_dtype
instead. input_dict['dtype'] = onnx.mapping.TENSOR_TYPE_TO_NP_TYPE[onnx_type.elem_type] WARNING: The argumentinput_shapes
is deprecated. Please useoverwrite_input_shapes
and/ortest_input_shapes
instead. An error will be raised in the future. warn: Nncase.Hosting.PluginLoader[0] NNCASE_PLUGIN_PATH is not set. sh: 1: nncase.simulator.k230.sc: not found Failed to run k230 scmodel(32512). [..runtime_function.cpp:176 (invoke)] Input/output error [..runtime_function.cpp:176 (invoke)] Input/output error Traceback (most recent call last): File "scripts/yolov5s_onnx_simu.py", line 69, inmain() File "scripts/yolov5s_onnx_simu.py", line 58, in main sim.run() RuntimeError: Input/output error
修改相关warn之后,kmodel正常build 了,根据报错信息,可能是check simu部分出错
warn: Nncase.Hosting.PluginLoader[0] NNCASE_PLUGIN_PATH is not set. warn: Nncase.Hosting.PluginLoader[0] NNCASE_PLUGIN_PATH is not set. warn: Nncase.Hosting.PluginLoader[0] NNCASE_PLUGIN_PATH is not set. sh: 1: nncase.simulator.k230.sc: not found Failed to run k230 scmodel(32512). [..runtime_function.cpp:176 (invoke)] Input/output error [..runtime_function.cpp:176 (invoke)] Input/output error Traceback (most recent call last): File "scripts/yolov5s_onnx_simu.py", line 69, in
main() File "scripts/yolov5s_onnx_simu.py", line 58, in main sim.run() RuntimeError: Input/output error
@roingbu 请把安装nncase-kpu的路径加入PATH
export PATH=$PATH:/python安装包的路径/site_packge
感谢,已解决
我是使用docker的,包括本地build的,和线上pull的都试过。 其中,nncase都试过print(_nncase.version) 在./build_model.sh后 yolov5s.onnx无法转为相应的kmodel,但mbv2.tflite可以