Skip to content

llava : fix memory leaks in minicpmv#9879

Closed
tc-mb wants to merge 2 commits into
ggml-org:masterfrom
tc-mb:fix-memory-leaks-in-minicpmv
Closed

llava : fix memory leaks in minicpmv#9879
tc-mb wants to merge 2 commits into
ggml-org:masterfrom
tc-mb:fix-memory-leaks-in-minicpmv

Conversation

@tc-mb

@tc-mb tc-mb commented Oct 14, 2024

Copy link
Copy Markdown
Contributor

I found that the code I previously implemented might have memory leaks. It would be difficult to detect this problem if I just executed the code once, but this bug was discovered by supporting the sever mode.
This pr is used to fix all known memory leak issues. After relatively long sever mode testing, it was determined that minicpmv had no other memory leak problems.

@ngxson ngxson left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also note that I'm refactoring all this parts in #9687 to be benefit of cpp automatic (de)allocation. In the future, we will almost never need to manually free an image.

Comment thread examples/llava/clip.cpp Outdated
Comment thread examples/llava/clip.cpp Outdated
@tc-mb

tc-mb commented Oct 16, 2024

Copy link
Copy Markdown
Contributor Author

Please also note that I'm refactoring all this parts in #9687 to be benefit of cpp automatic (de)allocation. In the future, we will almost never need to manually free an image.

Cool, I am a staff of the MiniCPM-V team. if you need to refactor the MiniCPM-V series, feel free ask me for help.

@ngxson ngxson changed the title fix memory leaks in minicpmv llava : fix memory leaks in minicpmv Oct 16, 2024

@ngxson ngxson left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. I'm re-running the CI. Will merge once it passes

@woojh3690

Copy link
Copy Markdown

Any update?

@tc-mb

tc-mb commented Jan 18, 2025

Copy link
Copy Markdown
Contributor Author

I will incorporate these changes in the new pr.

@tc-mb tc-mb deleted the fix-memory-leaks-in-minicpmv branch January 18, 2025 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants