Changing vulkan GGML_VK_FORCE_MAX_ALLOCATION_SIZE to parse 64-bit not 32-bit

This commit is contained in:
richardanaya2_2048b.Q6_K.gguf 2024-06-06 07:01:51 +00:00
parent 2d08b7fbb4
commit 9262d55780

View file

@ -1773,7 +1773,7 @@ static void ggml_vk_init(ggml_backend_vk_context * ctx, size_t idx) {
const char* GGML_VK_FORCE_MAX_ALLOCATION_SIZE = getenv("GGML_VK_FORCE_MAX_ALLOCATION_SIZE"); const char* GGML_VK_FORCE_MAX_ALLOCATION_SIZE = getenv("GGML_VK_FORCE_MAX_ALLOCATION_SIZE");
if (GGML_VK_FORCE_MAX_ALLOCATION_SIZE != nullptr) { if (GGML_VK_FORCE_MAX_ALLOCATION_SIZE != nullptr) {
ctx->device->max_memory_allocation_size = std::stoi(GGML_VK_FORCE_MAX_ALLOCATION_SIZE); ctx->device->max_memory_allocation_size = std::stol(GGML_VK_FORCE_MAX_ALLOCATION_SIZE);
} else if (maintenance4_support) { } else if (maintenance4_support) {
ctx->device->max_memory_allocation_size = std::min(props3.maxMemoryAllocationSize, props4.maxBufferSize); ctx->device->max_memory_allocation_size = std::min(props3.maxMemoryAllocationSize, props4.maxBufferSize);
} else { } else {