PaddlePaddle / Paddle-Lite

PaddlePaddle High Performance Deep Learning Inference Engine for Mobile and Edge (飞桨高性能深度学习端侧推理引擎)
https://www.paddlepaddle.org.cn/lite
Apache License 2.0
6.96k stars 1.61k forks source link

ST-GCN行为识别模型在端侧部署运行时,CreatePaddlePredictor内存占用过大 #8970

Closed wangle-wang closed 9 months ago

wangle-wang commented 2 years ago

[I 8/ 5 17: 2:41.248 ...periment/Paddle-Lite/lite/api/cxx_api.cc:461 CheckPaddleOpVersions] Warning: incompatible paddle op version. Kernel (fill_constant:host/any/NCHW) requires that op_version(fill_constant)==1. However, the op_version(fill_constant) in this models is 2. It's suggested to use PaddlePaddle and Paddle-Lite of the same op_version(fill_constant). [I 8/ 5 17: 2:41.421 ...e-Lite/lite/model_parser/model_parser.cc:562 SaveModelNaive] 2. Model is optimized and saved into ./STGCN.nb successfully [F 8/ 5 17: 3:21.389 ...ite/lite/backends/host/target_wrapper.cc:29 Malloc] Check failed: p: Error occurred in TargetWrapper::Malloc period: no enough for mallocing 57446400 bytes. [F 8/ 5 17: 3:21.389 ...ite/lite/backends/host/target_wrapper.cc:29 Malloc] Check failed: p: Error occurred in TargetWrapper::Malloc period: no enough for mallocing 57446400 bytes.

提示malloc时运行内存不足,进入adb shell中查看板端运行时1109内存占用情况,发现在 执行 CreatePaddlePredictor(mobile_config) 时占用了大量内存,1109 844M运行内存被全部占用导致Error occurred in TargetWrapper::Malloc period: no enough for mallocing 57446400 bytes. malloc 时空间不足。

换用内存空间更大的RK3568开发板运行ST-GCN模型,可以成功在3568上运行nb模型,但内存占用很大,在通过 CreatePaddlePredictor 接口创建 Predictor 对像时收集大量内存,3568 可用内存从1553M->22M,模型配置阶段占用了1500+M的运存,不清楚什么原因导致在端侧部署时会占用如此大量的内存,在3568上运行ST-GCN模型时并没报error信息,在生成nb模型时,报如下warning: [I 2/14 10:12:40. 69 ...periment/Paddle-Lite/lite/api/cxx_api.cc:461 CheckPaddleOpVersions] Warning: incompatible paddle op version. Kernel (fill_constant:host/any/NCHW) requires that op_version(fill_constant)==1. However, the op_version(fill_constant) in this models is 2. It's suggested to use PaddlePaddle and Paddle-Lite of the same op_version(fill_constant). [I 2/14 10:12:40.309 ...e-Lite/lite/model_parser/model_parser.cc:562 SaveModelNaive] 2. Model is optimized and saved into ./STGCN.nb successfully

麻烦请有空帮忙看下这种情况可能是什么原因导致的,或者请提供一下排查该问题原因的思路,谢谢。

paddle-bot-old[bot] commented 2 years ago

您好,我们已经收到了您的问题,会安排技术人员尽快解答您的问题,请耐心等待。请您再次检查是否提供了清晰的问题描述、复现代码、环境&版本、报错信息等。同时,您也可以通过查看官网文档常见问题历史Issue来寻求解答。祝您生活愉快~

Hi! We've received your issue and please be patient to get responded. We will arrange technicians to answer your questions as soon as possible. Please make sure that you have posted enough message to demo your request. You may also check out the APIFAQ and Github Issue to get the answer.Have a nice day!

lxwlaq commented 2 years ago

同学: 1.这个warning暂时不用管 2.你在demo中输入shape多大?

wangle-wang commented 2 years ago

同学: 1.这个warning暂时不用管 2.你在demo中输入shape多大?

感谢回复,模型INPUT_SHAPE = {88, 2, 50, 17,1}

lxwlaq commented 2 years ago

同学 你这个问题我在rk3399上也复现了 具体原因需要进一步定位

wangle-wang commented 2 years ago

同学 你这个问题我在rk3399上也复现了 具体原因需要进一步定位

好的,感谢对此问题的关注,如定位到问题原因烦请告知,谢谢

qlogcn commented 2 years ago

准备用rk3568+paddle做项目,希望官方多多支持rk3568