PaddleOCR
PaddleOCR copied to clipboard
paddleocr 2.8.1 paddlepaddle-gpu 2.6.1 占用大量显存并且只增不减,很快cuda oom
🔎 Search before asking
- [X] I have searched the PaddleOCR Docs and found no similar bug report.
- [X] I have searched the PaddleOCR Issues and found no similar bug report.
- [X] I have searched the PaddleOCR Discussions and found no similar bug report.
🐛 Bug (问题描述)
你好,我们原本是使用paddleocr==2.7.0.3 paddlepaddle-gpu==2.5.2.post117,一切都正常,最近我们升级到paddleocr 2.8.1 paddlepaddle-gpu 2.6.1 (cuda 11.8),但是现在很快cuda OOM。看log是推理占用大量显存并且只增不减从不释放。(我们已经用了paddle.device.cuda.empty_cache()
- 非常奇怪,相同的batchsize设置,以前基本上模型只需要占用2-3G的显存,现在很快就16-24G,甚至放到显存更大的机器直接上到40+G。
请问可能是什么有问题?除了退回原先版本之外还有别的释放显存方法吗?
🏃♂️ Environment (运行环境)
当前
OS: linux ubuntu 22.04
paddleocr 2.8.1
paddlepaddle-gpu 2.6.1
cuda 11.8
cudnn 8.9.6
python 3.12
之前运行正常时候
OS: linux ubuntu 20.04
paddleocr: 2.7.0.3
paddlepaddle-gpu 2.5.2.post117
cuda 11.7
cudnn 8.5.0
python 3.10
🌰 Minimal Reproducible Example (最小可复现问题的Demo)
目前很难提供,但是只有我们遇到了这样的问题吗?