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

how to release gpu memory when use onnxruntime with fastapi #22899

Open
SZ-ing opened this issue Nov 20, 2024 · 0 comments
Open

how to release gpu memory when use onnxruntime with fastapi #22899

SZ-ing opened this issue Nov 20, 2024 · 0 comments
Labels
api issues related to all other APIs: C, C++, Python, etc.

Comments

@SZ-ing
Copy link

SZ-ing commented Nov 20, 2024

This is probably a repetitive problem, but I still haven't found how to solve it.

I used FastAPI to build API interfaces and used onnxruntime to load models. However, due to the limited number of models and gpu memory, I hope to release this part of the occupied gpu memory after each interface call is completed. But it seems that I can never fully release it, and there will still be some models occupying gpu memory.

I want to know if there is any way to solve this problem for Python.

@amarin16 amarin16 added the api issues related to all other APIs: C, C++, Python, etc. label Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api issues related to all other APIs: C, C++, Python, etc.
Projects
None yet
Development

No branches or pull requests

2 participants