mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2026-07-10 01:18:32 +00:00
skip dot2 vulkan shaders for noext build
This commit is contained in:
parent
60d0e70d76
commit
3424543568
3 changed files with 15 additions and 2 deletions
4
Makefile
4
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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -427,6 +427,15 @@ void string_to_spv(std::string name, const std::string& source, const std::map<s
|
|||
name = name + (f16acc ? "_f16acc" : "") + (coopmat ? "_cm1" : "") + (coopmat2 ? "_cm2" : (fp16 ? "" : "_fp32")) + suffix;
|
||||
std::string out_path = join_paths(output_dir, name + ".spv");
|
||||
|
||||
#ifdef NO_VULKAN_EXTENSIONS
|
||||
if (name.find("_dot2") != std::string::npos) {
|
||||
write_binary_file(out_path, std::string(1, '\0'));
|
||||
std::lock_guard<std::mutex> 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));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue