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
9495
9495
UNUSED(buft);
9496
9496
}
9497
9497
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
+
9498
9504
// Should be changed to return device-specific host buffer type
9499
9505
// but that probably requires changes in llama.cpp
9500
9506
ggml_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() {
9503
9509
/* .get_name = */ ggml_backend_vk_host_buffer_type_name,
9504
9510
/* .alloc_buffer = */ ggml_backend_vk_host_buffer_type_alloc_buffer,
9505
9511
/* .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,
9507
9513
/* .get_alloc_size = */ ggml_backend_cpu_buffer_type()->iface.get_alloc_size,
9508
9514
/* .is_host = */ ggml_backend_cpu_buffer_type()->iface.is_host,
9509
9515
},
You can’t perform that action at this time.
0 commit comments