vulkan: record actual memory properties during buffer creation (llama/24326)

This commit is contained in:
Winston Ma 2026-06-17 17:14:48 +08:00 committed by Georgi Gerganov
parent 201f69ce6a
commit ae09736e83
1 changed files with 1 additions and 1 deletions

View File

@ -3008,13 +3008,13 @@ static vk_buffer ggml_vk_create_buffer(vk_device& device, size_t size, const std
if (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) {