Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用经过paddle-lite-opt优化后的模型,在压测环境下报错(fread(dst, 1, size, file_) == size): 0!==262288 Failed to read 262288 bytes. #10501

Open
L-Inkink opened this issue Apr 19, 2024 · 4 comments
Assignees

Comments

@L-Inkink
Copy link

L-Inkink commented Apr 19, 2024

为使您的问题得到快速解决,在建立 Issue 前,请您先通过如下方式搜索是否有相似问题: 历史 issue, FAQ 文档, 官方文档

建立 issue 时,为快速解决问题,请您根据使用情况给出如下信息:

  • 标题:使用经过paddle-lite-opt优化后的模型,在压测环境下报错
  • 版本、环境信息:
       1)Paddle Lite 版本:v2.13
       2)Host 环境:Linux Ubuntu编译\Android 14使用
  • 模型信息
       1)模型名称:ch_PP-OCRv4_rec_infer
    2)模型链接:https://paddleocr.bj.bcebos.com/PP-OCRv4/chinese/ch_PP-OCRv4_rec_infer.tar
  • 复现信息:提供 OPT 使用命令或方法,用于复现问题
    ./opt --model_file=./raw_models/ch_PP-OCRv4_rec_infer/inference.pdmodel --param_file=./raw_models/ch_PP-OCRv4_rec_infer/inference.pdiparams --optimize_out_type=naive_buffer --optimize_out=./raw_models/ch_PP-OCRv4_rec_infer/ --quant_model=true --quant_type=QUANT_INT8 --visualization_file_output_path=./raw_models/
  • 问题描述:请详细描述您的问题,同步贴出报错信息、日志/代码关键片段
    04-10 14:00:30.151 32306 32714 I Paddle-Lite: [I 4/10 14: 0:30.150 ...-Lite/lite/backends/opencl/cl_runtime.cc:69 Init] opencl_lib_found:0
    04-10 14:00:30.151 32306 32714 I Paddle-Lite: [I 4/10 14: 0:30.151 ...-Lite/lite/backends/opencl/cl_runtime.cc:69 Init] opencl_lib_found:0
    04-10 14:00:30.151 32306 32714 I Paddle-Lite: [I 4/10 14: 0:30.151 ...-Lite/lite/backends/opencl/cl_runtime.cc:69 Init] opencl_lib_found:0
    04-10 14:00:30.154 32306 32714 I Paddle-Lite: [I 4/10 14: 0:30.154 ...-Lite/lite/backends/opencl/cl_runtime.cc:69 Init] opencl_lib_found:0
    04-10 14:00:30.159 32306 32714 I Paddle-Lite: [I 4/10 14: 0:30.159 ...-Lite/lite/backends/opencl/cl_runtime.cc:69 Init] opencl_lib_found:0
    04-10 14:00:30.159 32306 32714 I Paddle-Lite: [I 4/10 14: 0:30.159 ...-Lite/lite/backends/opencl/cl_runtime.cc:69 Init] opencl_lib_found:0
    04-10 14:00:30.160 32306 32714 I Paddle-Lite: [I 4/10 14: 0:30.160 ...-Lite/lite/backends/opencl/cl_runtime.cc:69 Init] opencl_lib_found:0
    04-10 14:00:30.165 32306 32714 I Paddle-Lite: [I 4/10 14: 0:30.165 ...-Lite/lite/backends/opencl/cl_runtime.cc:69 Init] opencl_lib_found:0
    04-10 14:00:30.165 32306 32714 I OCR_NDK : lang infer cost: 79.581616
    04-10 14:00:30.169 32306 32714 I OCR_NDK : Read file:/data/user/0/rec_crnn.nb, file_size: 1048576, bytes_read: 1048576
    04-10 14:00:30.169 32306 32714 I OCR_NDK : pre det, init rec predictor, max_pre_index :1
    04-10 14:00:30.169 32306 32714 I Paddle-Lite: [I 4/10 14: 0:30.169 ...ezhou/Paddle-Lite/lite/api/paddle_api.cc:44 IsOpenCLBackendValid] need to check fp16 valid:0
    04-10 14:00:30.169 32306 32714 I Paddle-Lite: [I 4/10 14: 0:30.169 ...ezhou/Paddle-Lite/lite/api/paddle_api.cc:51 IsOpenCLBackendValid] Found opencl library:0
    04-10 14:00:30.169 32306 32714 I OCR_NDK : ocr cpp device: running on cpu.
    04-10 14:00:30.169 32306 32714 W Paddle-Lite: [W 4/10 14: 0:30.169 ...e-Lite/lite/model_parser/model_parser.cc:856 LoadModelFbsFromFile]
    04-10 14:00:30.169 32306 32714 W Paddle-Lite: warning: the version of opt that transformed this model is not consistent with current Paddle-Lite version.
    04-10 14:00:30.169 32306 32714 W Paddle-Lite: version of opt:v2.10
    04-10 14:00:30.169 32306 32714 W Paddle-Lite: version of current Paddle-Lite:cbb5006ec
    04-10 14:00:30.170 32306 32714 F Paddle-Lite: [F 4/10 14: 0:30.170 ...u/Paddle-Lite/lite/core/model/base/io.cc:54 Read] Check failed: (fread(dst, 1, size, file_) == size): 0!==262288 Failed to read 262288 bytes.
@hong19860320
Copy link
Collaborator

opt 版本和 paddle lite 库版本不一致
image

@L-Inkink
Copy link
Author

L-Inkink commented Apr 22, 2024

opt 版本和 paddle lite 库版本不一致 image

但是在平时使用的时候不会出现这个报错,只有压测的时候会出现,版本不一致是会偶现地导致这个报错吗

@hong19860320
Copy link
Collaborator

opt 版本和 paddle lite 库版本不一致 image

但是在平时使用的时候不会出现这个报错,只有压测的时候会出现,版本不一致是会偶现地导致这个报错吗

先对齐一下版本,排除版本差异的原因哈~

@L-Inkink
Copy link
Author

opt 版本和 paddle lite 库版本不一致 image

但是在平时使用的时候不会出现这个报错,只有压测的时候会出现,版本不一致是会偶现地导致这个报错吗

先对齐一下版本,排除版本差异的原因哈~

好的~谢谢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants