From 2bb3597e426ce092c3e10ae0bdd876963765e6ed Mon Sep 17 00:00:00 2001 From: Wagner Bruna Date: Tue, 1 Apr 2025 06:38:07 -0300 Subject: [PATCH 1/2] vulkan: fix build when glslc doesn't support coopmat (#12683) --- ggml/src/ggml-vulkan/ggml-vulkan.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ggml/src/ggml-vulkan/ggml-vulkan.cpp b/ggml/src/ggml-vulkan/ggml-vulkan.cpp index 31330e2b2..ee0969fe1 100644 --- a/ggml/src/ggml-vulkan/ggml-vulkan.cpp +++ b/ggml/src/ggml-vulkan/ggml-vulkan.cpp @@ -3136,7 +3136,9 @@ static void ggml_vk_print_gpu_info(size_t idx) { && shader_integer_dot_product_features.shaderIntegerDotProduct; coopmat_support = coopmat_support +#if defined(GGML_VULKAN_COOPMAT_GLSLC_SUPPORT) && coopmat_features.cooperativeMatrix +#endif && ggml_vk_khr_cooperative_matrix_support(props2.properties, driver_props, device_architecture); std::string matrix_cores = coopmat2_support ? "NV_coopmat2" : coopmat_support ? "KHR_coopmat" : "none"; From a6f32f0b3437ac79827ffb55521cb839343324ab Mon Sep 17 00:00:00 2001 From: R0CKSTAR Date: Tue, 1 Apr 2025 19:12:53 +0800 Subject: [PATCH 2/2] Fix clang warning in gguf_check_reserved_keys (#12686) * Fix clang warning in gguf_check_reserved_keys Signed-off-by: Xiaodong Ye * Fix typo Signed-off-by: Xiaodong Ye --------- Signed-off-by: Xiaodong Ye --- common/minja/minja.hpp | 4 ++-- ggml/src/gguf.cpp | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/common/minja/minja.hpp b/common/minja/minja.hpp index fa4c34d6e..1a30499e7 100644 --- a/common/minja/minja.hpp +++ b/common/minja/minja.hpp @@ -240,7 +240,7 @@ public: auto index = key.get(); return array_->at(index < 0 ? array_->size() + index : index); } else if (object_) { - if (!key.is_hashable()) throw std::runtime_error("Unashable type: " + dump()); + if (!key.is_hashable()) throw std::runtime_error("Unhashable type: " + dump()); auto it = object_->find(key.primitive_); if (it == object_->end()) return Value(); return it->second; @@ -249,7 +249,7 @@ public: } void set(const Value& key, const Value& value) { if (!object_) throw std::runtime_error("Value is not an object: " + dump()); - if (!key.is_hashable()) throw std::runtime_error("Unashable type: " + dump()); + if (!key.is_hashable()) throw std::runtime_error("Unhashable type: " + dump()); (*object_)[key.primitive_] = value; } Value call(const std::shared_ptr & context, ArgumentsValue & args) const { diff --git a/ggml/src/gguf.cpp b/ggml/src/gguf.cpp index ab13669c5..381a9c7dc 100644 --- a/ggml/src/gguf.cpp +++ b/ggml/src/gguf.cpp @@ -932,6 +932,7 @@ static void gguf_check_reserved_keys(const std::string & key, const T val) { if constexpr (std::is_same::value) { GGML_ASSERT(val > 0 && (val & (val - 1)) == 0 && GGUF_KEY_GENERAL_ALIGNMENT " must be power of 2"); } else { + GGML_UNUSED(val); GGML_ABORT(GGUF_KEY_GENERAL_ALIGNMENT " must be type u32"); } }