]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
vulkan : remove unused portability_enumeration_ext variable (#15679)
authorDaniel Bevenius <redacted>
Sun, 31 Aug 2025 06:46:42 +0000 (08:46 +0200)
committerGitHub <redacted>
Sun, 31 Aug 2025 06:46:42 +0000 (08:46 +0200)
This commit removes the portability_enumeration_ext variable from the
ggml_vk_instance_portability_enumeration_ext_available function as it
is initialized to false but never modified, making it redundant.

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

index 7658f56f2dee565c0e882d736795a5b46ad4830e..a44a2770b835dce55075e6e345f3fc56d6a17ca5 100644 (file)
@@ -12015,16 +12015,13 @@ static bool ggml_vk_instance_validation_ext_available(const std::vector<vk::Exte
 }
 static bool ggml_vk_instance_portability_enumeration_ext_available(const std::vector<vk::ExtensionProperties>& instance_extensions) {
 #ifdef __APPLE__
-    bool portability_enumeration_ext = false;
     // Check for portability enumeration extension for MoltenVK support
     for (const auto& properties : instance_extensions) {
         if (strcmp("VK_KHR_portability_enumeration", properties.extensionName) == 0) {
             return true;
         }
     }
-    if (!portability_enumeration_ext) {
-        std::cerr << "ggml_vulkan: WARNING: Instance extension VK_KHR_portability_enumeration not found." << std::endl;
-    }
+    std::cerr << "ggml_vulkan: WARNING: Instance extension VK_KHR_portability_enumeration not found." << std::endl;
 #endif
     return false;