From d3d7dae82b7ea9534c110f42413eb0fa521cde60 Mon Sep 17 00:00:00 2001 From: Concedo <39025047+LostRuins@users.noreply.github.com> Date: Thu, 9 Jan 2025 17:31:38 +0800 Subject: [PATCH] prevent crash if we ever want to build without coopmat --- ggml/src/ggml-vulkan/ggml-vulkan.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ggml/src/ggml-vulkan/ggml-vulkan.cpp b/ggml/src/ggml-vulkan/ggml-vulkan.cpp index 001096761..149ce04ca 100644 --- a/ggml/src/ggml-vulkan/ggml-vulkan.cpp +++ b/ggml/src/ggml-vulkan/ggml-vulkan.cpp @@ -2188,6 +2188,10 @@ static vk_device ggml_vk_get_device(size_t idx) { device->coopmat_support = false; } + #if !defined(GGML_VULKAN_COOPMAT_GLSLC_SUPPORT) //prevent crash if we do a non-coopmat build + device->coopmat_support = false; + #endif + std::vector queue_family_props = device->physical_device.getQueueFamilyProperties(); // Try to find a non-graphics compute queue and transfer-focused queues