Skip to content

mtmd : move helpers to dedicated file #13442

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

Merged
merged 3 commits into from
May 11, 2025

Conversation

ngxson
Copy link
Collaborator

@ngxson ngxson commented May 10, 2025

Ref discussion: #13366 (comment) (cc @mattjcly)

These helper functions are suppose to be the equivalent of common.cpp, so by moving it to a dedicated file, we can prevent accidentally using internal mtmd API in the helper.

2 exceptions of this rule are:

  • mtmd_helper_bitmap_init_from_file
  • mtmd_helper_bitmap_init_from_buf

The reason is because these APIs use internal struct from clip.cpp. From libmtmd perspective, we never want to expose clip_context to the outside world. However, the problem with these 2 APIs can be resolved by simply move stb_image to mtmh_helper.cpp. But since this is a breaking change to clip, I'll do it later on.

@ngxson ngxson requested a review from ggerganov May 10, 2025 21:00
@ngxson ngxson merged commit a634d75 into ggml-org:master May 11, 2025
44 checks passed
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.

2 participants