Skip to content

Commit 90f17bb

Browse files
committed
Vulkan: Default to 1GB allocations instead of 4GB to avoid fragmentation and driver issues
1 parent b1b132e commit 90f17bb

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

ggml/src/ggml-vulkan/ggml-vulkan.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2512,13 +2512,9 @@ static vk_device ggml_vk_get_device(size_t idx) {
25122512

25132513
if (GGML_VK_SUBALLOCATION_BLOCK_SIZE != nullptr) {
25142514
device->suballocation_block_size = std::stoul(GGML_VK_SUBALLOCATION_BLOCK_SIZE);
2515-
#if defined(_WIN32)
2516-
} else if (device->vendor_id == VK_VENDOR_ID_NVIDIA) {
2515+
} else {
25172516
// Limit batching of allocations to 1GB by default to avoid fragmentation issues
25182517
device->suballocation_block_size = 1024*1024*1024;
2519-
#endif
2520-
} else {
2521-
device->suballocation_block_size = device->max_memory_allocation_size;
25222518
}
25232519
device->suballocation_block_size = std::min(device->suballocation_block_size, device->max_memory_allocation_size);
25242520

0 commit comments

Comments
 (0)