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

为啥训练完成后显存没有释放 #10

Open
kc-w opened this issue Mar 14, 2024 · 3 comments
Open

为啥训练完成后显存没有释放 #10

kc-w opened this issue Mar 14, 2024 · 3 comments

Comments

@kc-w
Copy link

kc-w commented Mar 14, 2024

No description provided.

@AllentDan
Copy link
Owner

torch 的显存最好手动释放吧

@kc-w
Copy link
Author

kc-w commented Mar 15, 2024

我用线程跑的训练,训练结束后内存和显存都没有释放,在网上也查了下用cudaDeviceReset()可以释放,但是调用过再次训练就没法加载模型了,像torch.cuda.empty_cache()这样的函数,libtroch里也没有,作者有什么好办法吗?

@AllentDan
Copy link
Owner

用进程吧,torch 的显存不容易释放干净

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