File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -9519,6 +9519,12 @@ static size_t ggml_backend_vk_host_buffer_type_get_alignment(ggml_backend_buffer
95199519 UNUSED(buft);
95209520}
95219521
9522+ static size_t ggml_backend_vk_host_buffer_type_get_max_size(ggml_backend_buffer_type_t buft) {
9523+ return vk_instance.devices[0]->suballocation_block_size;
9524+
9525+ UNUSED(buft);
9526+ }
9527+
95229528// Should be changed to return device-specific host buffer type
95239529// but that probably requires changes in llama.cpp
95249530ggml_backend_buffer_type_t ggml_backend_vk_host_buffer_type() {
@@ -9527,7 +9533,7 @@ ggml_backend_buffer_type_t ggml_backend_vk_host_buffer_type() {
95279533 /* .get_name = */ ggml_backend_vk_host_buffer_type_name,
95289534 /* .alloc_buffer = */ ggml_backend_vk_host_buffer_type_alloc_buffer,
95299535 /* .get_alignment = */ ggml_backend_vk_host_buffer_type_get_alignment,
9530- /* .get_max_size = */ NULL, // defaults to SIZE_MAX
9536+ /* .get_max_size = */ ggml_backend_vk_host_buffer_type_get_max_size,
95319537 /* .get_alloc_size = */ ggml_backend_cpu_buffer_type()->iface.get_alloc_size,
95329538 /* .is_host = */ ggml_backend_cpu_buffer_type()->iface.is_host,
95339539 },
You can’t perform that action at this time.
0 commit comments