Skip to content

Commit 2f25907

Browse files
committed
checkpoint
1 parent 5c161b4 commit 2f25907

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

ggml/src/ggml-metal/ggml-metal.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#define MAX(a, b) ((a) > (b) ? (a) : (b))
1515

1616
// max memory buffers that can be mapped to the device
17-
#define GGML_METAL_MAX_BUFFERS 64
17+
#define GGML_METAL_MAX_BUFFERS 128
1818

1919
// max number of MTLCommandBuffer used to submit a graph for processing
2020
#define GGML_METAL_MAX_COMMAND_BUFFERS 8

ggml/src/ggml-rpc/ggml-rpc.cpp

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1772,13 +1772,30 @@ static ggml_backend_dev_t ggml_backend_rpc_reg_get_device(ggml_backend_reg_t reg
17721772
GGML_UNUSED(index);
17731773
}
17741774

1775+
static ggml_backend_buffer_type_t ggml_backend_rpc_split_buffer_type(int main_device, const float * tensor_split) {
1776+
// For RPC backend, we don't implement actual tensor splitting
1777+
// Just return the default buffer type for the main device
1778+
ggml_backend_dev_t dev = ggml_backend_reg_dev_get(ggml_backend_rpc_reg(), main_device);
1779+
if (!dev) {
1780+
return nullptr;
1781+
}
1782+
1783+
// Suppress unused parameter warning
1784+
GGML_UNUSED(tensor_split);
1785+
1786+
return ggml_backend_dev_buffer_type(dev);
1787+
}
1788+
17751789
static void * ggml_backend_rpc_get_proc_address(ggml_backend_reg_t reg, const char * name) {
17761790
if (std::strcmp(name, "ggml_backend_rpc_add_device") == 0) {
17771791
return (void *)ggml_backend_rpc_add_device;
17781792
}
17791793
if (std::strcmp(name, "ggml_backend_rpc_start_server") == 0) {
17801794
return (void *)ggml_backend_rpc_start_server;
17811795
}
1796+
if (std::strcmp(name, "ggml_backend_split_buffer_type") == 0) {
1797+
return (void *)ggml_backend_rpc_split_buffer_type;
1798+
}
17821799
return NULL;
17831800

17841801
GGML_UNUSED(reg);

0 commit comments

Comments
 (0)