vulkan: Make device memory check more portable (llama/15939)

This commit is contained in:
Mathieu Baudier 2025-09-12 09:06:20 +02:00 committed by Georgi Gerganov
parent cd764eaf2b
commit 5a752bab84
No known key found for this signature in database
GPG Key ID: 449E073F9DC10735
1 changed files with 1 additions and 1 deletions

View File

@ -1960,7 +1960,7 @@ static vk_buffer ggml_vk_create_buffer(vk_device& device, size_t size, const std
}
}
if (buf->device_memory == VK_NULL_HANDLE) {
if (!buf->device_memory) {
device->device.destroyBuffer(buf->buffer);
throw vk::OutOfDeviceMemoryError("No suitable memory type found");
}