InternVL icon indicating copy to clipboard operation
InternVL copied to clipboard

[Bug] 显存泄露问题

Open freehome1 opened this issue 1 year ago • 1 comments

Checklist

  • [x] 1. I have searched related issues but cannot get the expected help.
  • [ ] 2. The bug has not been fixed in the latest version.
  • [ ] 3. Please note that if the bug-related issue you submitted lacks corresponding environment info and a minimal reproducible demo, it will be challenging for us to reproduce and resolve the issue, reducing the likelihood of receiving feedback.

Describe the bug

使用quick start进行pytorch原生推理,在推理过程中显存不断增加,因计算所带来的显存占用未清理,且如果重复跑一个case不会增加,新跑一个case就会占用显存,直至OOM

Reproduction

quick start

Environment

PyTorch 2.0
v100-32G
internvl-8B

Error traceback

No response

freehome1 avatar Aug 14 '24 07:08 freehome1

您好,您可以尝试在每次推理结束后都运行torch.cuda.empty_cache(),会清空每次计算产生的显存。

czczup avatar Aug 26 '24 04:08 czczup

Hi, since there hasn't been any recent activity on this issue, I'll be closing it for now. If it's still an active concern, don't hesitate to reopen it. Thanks for your understanding!

czczup avatar Dec 09 '24 11:12 czczup