metal : map the CPU buffers to Metal buffers (WIP)

This commit is contained in:
Georgi Gerganov 2023-07-20 14:30:34 +03:00
parent f38433ef5d
commit 290cb700bf
No known key found for this signature in database
GPG key ID: 449E073F9DC10735
5 changed files with 78 additions and 24 deletions

View file

@ -34,9 +34,17 @@
extern "C" {
#endif
// GG: maybe return ptr and avoid the "ggml.h" include
struct ggml_backend * ggml_backend_metal_init(struct ggml_backend * backend_cpu);
// TODO: temporary - move to backend interface
bool ggml_backend_metal_map_buffer(
struct ggml_backend * backend,
const char * name,
void * data,
size_t size,
size_t max_size);
//struct ggml_metal_context;
//
//// number of command buffers to use