llama.cpp Bug: Vulkan构建不再与Windows上的MSVC cmake一起工作

s8vozzvw  于 2个月前  发布在  Windows
关注(0)|答案(2)|浏览(40)

发生了什么?
尝试构建Vulkan后端的最新版本时,着色器编译失败。
我怀疑提交17eb6aa引入了这个问题,但需要进行更多测试才能确定。

名称和版本

提交:3807c3d
cmake标志:-DBUILD_SHARED_LIBS=OFF -DGGML_VULKAN=1 -G "Visual Studio 17 2022" -A x64
MSBuild版本:17.9.8+b34f75857
Vulkan示例版本:1.3.261

您在哪个操作系统上看到问题?

Windows

相关日志输出

Version MSBuild 17.9.8+b34f75857 pour .NET Framework

[...]

Generate vulkan shaders
  ggml_vulkan: Generating and compiling shaders to SPIR-V
  cannot compile mul_mat_vec_id_f32_f32

  C:/VulkanSDK/1.3.275.0/Bin/glslc.exe -fshader-stage=compute --target-env=vulkan1.2 -O C:/llama cpp/ggml/src/vulkan-shaders\mul_mat_vec.comp -o C:/llama cpp/build/ggml/src/vulkan-shaders.spv\mul_mat_vec_id
  _f32_f32.spv -DB_TYPE=float -DDATA_A_F32=1 -DD_TYPE=float -DFLOAT_TYPE=float -DMUL_MAT_ID=1

glslc : error : linking multiple files is not supported yet. Use -c to compile files individually. [C:\llama cpp\build\ggml\src\ggml.vcxproj]

  cannot compile cannot compile mul_mat_vec_q4_0_f32_f32mul_mat_vec_q4_0_f16_f32

  C:/VulkanSDK/1.3.275.0/Bin/glslc.exe -fshader-stage=compute --target-env=vulkan1.2 -O C:/llama cpp/ggml/src/vulkan-shaders\mul_mat_vec.comp -o C:/llama cpp/build/ggml/src/vulkan-shaders.spv\mul_mat_vec_q4
  _0_f32_f32.spv -DB_TYPE=float -DDATA_A_Q4_0=1 -DD_TYPE=float -DFLOAT_TYPE=float


glslc : error : linking multiple files is not supported yet. Use -c to compile files individually. [C:\llama cpp\build\ggml\src\ggml.vcxproj]

(this goes on for every op, and build crashes with code -1)
qnakjoqk

qnakjoqk1#

刚刚再次测试,我可以确认提交17eb6aa(pr #8119)引入了这个错误。

f3temu5u

f3temu5u2#

我遇到了一些与Vulkan着色器相关的错误
[ 2%] 生成Vulkan着色器
/bin/sh: 1: vulkan-shaders-gen: 未找到
make[2]: *** [ggml/src/CMakeFiles/ggml.dir/build.make:123: ggml/src/ggml-vulkan-shaders.hpp] 错误127
make[1]: *** [CMakeFiles/Makefile2:1653: ggml/src/CMakeFiles/ggml.dir/all] 错误2
make: *** [Makefile:146: all] 错误2

相关问题