From 342454356806a8a45562e8c7b537f1bf70f20bdb Mon Sep 17 00:00:00 2001 From: Concedo <39025047+LostRuins@users.noreply.github.com> Date: Fri, 12 Jun 2026 15:20:41 +0800 Subject: [PATCH] skip dot2 vulkan shaders for noext build --- Makefile | 4 ++-- ggml/src/ggml-vulkan/ggml-vulkan.cpp | 4 ++++ .../ggml-vulkan/vulkan-shaders/vulkan-shaders-gen.cpp | 9 +++++++++ 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 9c09abad5..f0b075975 100644 --- a/Makefile +++ b/Makefile @@ -797,11 +797,11 @@ qwen3tts: otherarch/qwen3tts/q3ttsmain.cpp otherarch/qwen3tts/qwen3_tts.cpp othe rpcserver: tools/rpc/rpc-server.cpp common/arg.cpp common/chat.cpp common/preset.cpp common/download.cpp build-info.h ggml_v4_vulkan.o ggml-cpu.o ggml-ops.o ggml-vec.o ggml-binops.o ggml-unops.o llama.o console.o clip_vulkan.o mtmd.o mtmd-helper.o mtmd-image.o ggml-backend.o ggml-backend-meta.o ggml-backend-reg_vulkan.o ggml-vulkan.o ggml-vulkan-shaders.o ggml-repack.o $(OBJS_FULL) $(OBJS) lib/vulkan-1.lib $(CXX) $(CXXFLAGS) -DGGML_USE_VULKAN -DSD_USE_VULKAN $(filter-out %.h,$^) -o $@ $(LDFLAGS) -ggml/src/ggml-vulkan-shaders.cpp: +ggml/src/ggml-vulkan-shaders.cpp: ggml/src/ggml-vulkan/vulkan-shaders/vulkan-shaders-gen.cpp ifdef VULKAN_BUILD @$(MAKE) vulkan-shaders-gen endif -ggml/src/ggml-vulkan-shaders-noext.cpp: +ggml/src/ggml-vulkan-shaders-noext.cpp: ggml/src/ggml-vulkan/vulkan-shaders/vulkan-shaders-gen.cpp ifdef VULKAN_BUILD @$(MAKE) vulkan-shaders-gen-noext endif diff --git a/ggml/src/ggml-vulkan/ggml-vulkan.cpp b/ggml/src/ggml-vulkan/ggml-vulkan.cpp index 4101c5593..3c0680c7f 100644 --- a/ggml/src/ggml-vulkan/ggml-vulkan.cpp +++ b/ggml/src/ggml-vulkan/ggml-vulkan.cpp @@ -5546,9 +5546,11 @@ static vk_device ggml_vk_get_device(size_t idx) { !getenv("GGML_VK_DISABLE_BFLOAT16")) { bfloat16_support = true; #endif +#ifndef NO_VULKAN_EXTENSIONS } else if (strcmp("VK_VALVE_shader_mixed_float_dot_product", properties.extensionName) == 0 && !getenv("GGML_VK_DISABLE_DOT2")) { dot2_f16_support = true; +#endif } else if (strcmp("VK_KHR_pipeline_executable_properties", properties.extensionName) == 0) { pipeline_executable_properties_support = true; } else if (strcmp("VK_EXT_memory_priority", properties.extensionName) == 0 && @@ -6352,9 +6354,11 @@ static void ggml_vk_print_gpu_info(size_t idx) { !getenv("GGML_VK_DISABLE_BFLOAT16")) { bfloat16_support = true; #endif +#ifndef NO_VULKAN_EXTENSIONS } else if (strcmp("VK_VALVE_shader_mixed_float_dot_product", properties.extensionName) == 0 && !getenv("GGML_VK_DISABLE_DOT2")) { dot2_f16_support = true; +#endif } } diff --git a/ggml/src/ggml-vulkan/vulkan-shaders/vulkan-shaders-gen.cpp b/ggml/src/ggml-vulkan/vulkan-shaders/vulkan-shaders-gen.cpp index 1d653c336..236157cf1 100644 --- a/ggml/src/ggml-vulkan/vulkan-shaders/vulkan-shaders-gen.cpp +++ b/ggml/src/ggml-vulkan/vulkan-shaders/vulkan-shaders-gen.cpp @@ -427,6 +427,15 @@ void string_to_spv(std::string name, const std::string& source, const std::map guard(lock); + shader_fnames.push_back(std::make_pair(name, out_path)); + return; + } +#endif + // if (input_filepath == "") { // // No input source to compile, only generate header for all shaders // shader_fnames.push_back(std::pair(name, out_path));