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 @@ -9495,6 +9495,12 @@ static size_t ggml_backend_vk_host_buffer_type_get_alignment(ggml_backend_buffer
94959495 UNUSED(buft);
94969496}
94979497
9498+ static size_t ggml_backend_vk_host_buffer_type_get_max_size(ggml_backend_buffer_type_t buft) {
9499+ return vk_instance.devices[0]->suballocation_block_size;
9500+
9501+ UNUSED(buft);
9502+ }
9503+
94989504// Should be changed to return device-specific host buffer type
94999505// but that probably requires changes in llama.cpp
95009506ggml_backend_buffer_type_t ggml_backend_vk_host_buffer_type() {
@@ -9503,7 +9509,7 @@ ggml_backend_buffer_type_t ggml_backend_vk_host_buffer_type() {
95039509 /* .get_name = */ ggml_backend_vk_host_buffer_type_name,
95049510 /* .alloc_buffer = */ ggml_backend_vk_host_buffer_type_alloc_buffer,
95059511 /* .get_alignment = */ ggml_backend_vk_host_buffer_type_get_alignment,
9506- /* .get_max_size = */ NULL, // defaults to SIZE_MAX
9512+ /* .get_max_size = */ ggml_backend_vk_host_buffer_type_get_max_size,
95079513 /* .get_alloc_size = */ ggml_backend_cpu_buffer_type()->iface.get_alloc_size,
95089514 /* .is_host = */ ggml_backend_cpu_buffer_type()->iface.is_host,
95099515 },
You can’t perform that action at this time.
0 commit comments