LLM inference in C/C++
C++ ggml
vulkan: record actual memory properties during buffer creation (#24326)
Winston Ma558e221b70c6
diff --git a/ggml/src/ggml-vulkan/ggml-vulkan.cpp b/ggml/src/ggml-vulkan/ggml-vulkan.cppindex 243ab76ee7..9a36b45de8 100644--- a/ggml/src/ggml-vulkan/ggml-vulkan.cpp+++ b/ggml/src/ggml-vulkan/ggml-vulkan.cpp@@ -3008,13 +3008,13 @@ static vk_buffer ggml_vk_create_buffer(vk_device& device, size_t size, const stdif (memory_type_indices.empty()) {continue;}- buf->memory_property_flags = req_flags;bool done = false;for (auto mtype_it = memory_type_indices.begin(); mtype_it != memory_type_indices.end(); mtype_it++) {try {buf->device_memory = device->device.allocateMemory({ mem_req.size, *mtype_it, &mem_flags_info });+ buf->memory_property_flags = mem_props.memoryTypes[*mtype_it].propertyFlags;done = true;break;} catch (const vk::SystemError& e) {