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

fix: free meta memory in clip model loading #11693

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

yushihang
Copy link

Fix Memory Leak in clip.cpp

Changes

  • Added ggml_free(meta); in all error handling paths

Testing

  • Local CI tests passed
  • Verified with llama-perplexity that the changes do not affect model performance
  • Verified with llama-bench that the changes do not affect runtime performance
  • Tested on:
    • macOS Ventura 13.x
    • Compiler: Apple clang version 14.0.3

Additional Notes

  • This is a pure memory management fix without any functional changes
  • Changes follow the project's coding guidelines

@yushihang
Copy link
Author

I've created separate PRs for each potential issue as I'm not entirely confident about the project's preferences for bundling changes.
While this might create more PRs to review, it allows for more focused discussions and easier rollbacks if needed.
I appreciate your patience in reviewing these atomic changes.

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.

1 participant