llama.cpp
llama.cpp copied to clipboard
ggml : add metal backend registry / device
target #9707
Adapt the Metal backend to the new registry and device interfaces.
- [x] I have read the contributing guidelines
- Self-reported review complexity:
- [ ] Low
- [ ] Medium
- [ ] High
ggml_backend_metal_buffer_type() also needs to be updated to set the device field.
There have been a few minor changes to the interfaces:
- The
get_backend_regfunction of the device interface has been removed, instead a pointer is stored directly inggml_backend_device: https://github.com/ggerganov/llama.cpp/pull/9707/commits/d0c4954fa01e90f61f9b5c5849f0d5732df0ea9f - Some functions have been renamed: https://github.com/ggerganov/llama.cpp/pull/9707/commits/cfef355611e38db20dedd9faad5f7b29e14a3004
This seems to be working now.
Should we put a deprecate notice for these API calls?
https://github.com/ggerganov/llama.cpp/blob/6dcb8991704b40d923691f037cdecc5430ff0440/ggml/include/ggml-metal.h#L41-L51
Should we put a deprecate notice for these API calls?
I think it may be too early for that, it's probably better to wait a bit until all the backends and the ggml examples are updated.