Skip to content

Bug: Vulkan build no longer working with MSVC cmake on windows #8562

@stduhpf

Description

@stduhpf

What happened?

When trying to build the lastest version of the Vulkan backend, the shader compilation fails.

I suspect commit 17eb6aa to have introduced the issue, but more testing is required to know for sure.

Name and Version

commit: 3807c3d
cmake flags: -DBUILD_SHARED_LIBS=OFF -DGGML_VULKAN=1 -G "Visual Studio 17 2022" -A x64
MSBuild version: 17.9.8+b34f75857
Vulkan Instance Version: 1.3.261

What operating system are you seeing the problem on?

Windows

Relevant log output

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug-unconfirmedcritical severityUsed to report critical severity bugs in llama.cpp (e.g. Crashing, Corrupted, Dataloss)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions