-
Notifications
You must be signed in to change notification settings - Fork 1k
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
ggml : add simple example #713
Conversation
will this add to/replace the example in ggml.h itself? Lines 32 to 174 in b2a5c34
|
This is a very useful example to have, good job! In the future I hope we can replace all the backend-specific initialization with the backend registry instead. It should already be possible, but I think it needs some generic function to initialize the "best" backend available. Also fair warning: the ggml-alloc API is going to change very soon, there is already a wrapper for backwards compatibility and I am not going to going to add another, so that means that all applications will need slight changes to adapt to the new ggml-alloc API. It will be a fairly minor change for most applications, though. |
Not really, it is still possible to use ggml with that API, ggml-backend and ggml-alloc are completely optional. But it may be better to rename this example to |
Thanks for this @FSSRepo ! It would be useful to change the dimensions of the matrices in order to highlight along which dimension is the reduction. Most people are used to multiplying row by column and might get surprised by the numbers. To disambiguate, you can use |
This is ready |
This PR only aims to add a new example that simply performs a matrix multiplication, solely for the purpose of demonstrating a basic usage of ggml and backend handling. The code is commented to help understand what each part does.