Skip to content

Conversation

@dg0yt
Copy link
Contributor

@dg0yt dg0yt commented May 31, 2025

This helps to validate the installed package.

It also shows a benefit of the other change: An in-build ggml::ggml ALIAS enables a uniform link library name regardless of ggml being used as a sub-project or via find_package.

@dg0yt
Copy link
Contributor Author

dg0yt commented Jun 1, 2025

And the next step is to make CMake config actually work.
Preferably by installing exported configuration.

@ggerganov ggerganov requested a review from slaren June 1, 2025 11:14
Copy link
Member

@slaren slaren left a comment

Choose a reason for hiding this comment

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

I am not sure about this. It would be ok to have an example specifically for this purpose, but just randomly changing one of the examples to be a separate project, without any documentation or explanation in the code, is just going to be confusing.

@ggerganov
Copy link
Member

Maybe for now just add the ggml::ggml alias and don't change the example?

@dg0yt
Copy link
Contributor Author

dg0yt commented Jun 2, 2025

Well, I just use this example to validate the installed cmake config (and in a variation, pkgconfig) of the vcpkg port. Your CI could do the same.

I explicitly tried to find a simple existing example. The additions should not cause much confusion - It is really just very basic CMake, nicely illustrating expected basic usage.

Helps to validate the installed package.
@dg0yt
Copy link
Contributor Author

dg0yt commented Jun 11, 2025

Your CI could do the same.

Proof of concept: dg0yt#1

@dg0yt
Copy link
Contributor Author

dg0yt commented Jun 20, 2025

  • There is no change for in-build experience.
  • There is a an extra comment explaining that it can be used in two ways.
  • There is a proof of concept how to use it for ggml CI.
    (And it includes fixes for relevant problems.)

What else would be needed to remove concerns?

@dg0yt
Copy link
Contributor Author

dg0yt commented Jul 9, 2025

Hm, I expected this to be a no-brainer. I wanted this to be merged before updating the ggml-org ports in vcpkg.

@dg0yt
Copy link
Contributor Author

dg0yt commented Jul 9, 2025

... and before upstreaming dg0yt#1.

@ggerganov
Copy link
Member

Create a new very trivial example called test-cmake and update its CMakeLists.txt for this purpose. The implementation in test-cmake.cpp can just call ggml_backend_load_all(); and exit.

@dg0yt
Copy link
Contributor Author

dg0yt commented Jul 10, 2025

Valid, but obsolete.

@dg0yt dg0yt closed this Jul 10, 2025
@dg0yt dg0yt deleted the ggml-test branch July 10, 2025 10:26
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

Successfully merging this pull request may close these issues.

3 participants