Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
stduhpf opened this issue Jul 18, 2024 · 4 comments · Fixed by #8573
Closed

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

stduhpf opened this issue Jul 18, 2024 · 4 comments · Fixed by #8573
Labels
bug-unconfirmed critical severity Used to report critical severity bugs in llama.cpp (e.g. Crashing, Corrupted, Dataloss)

Comments

@stduhpf
Copy link
Contributor

stduhpf commented Jul 18, 2024

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)
@stduhpf stduhpf added bug-unconfirmed critical severity Used to report critical severity bugs in llama.cpp (e.g. Crashing, Corrupted, Dataloss) labels Jul 18, 2024
@stduhpf
Copy link
Contributor Author

stduhpf commented Jul 18, 2024

Just tested again, I can confirm that commit 17eb6aa (pr #8119) introduced this error.

@Utkarsh4430
Copy link

I am getting some errors related to vulkan shaders as well

[ 2%] Generate vulkan shaders
/bin/sh: 1: vulkan-shaders-gen: not found
make[2]: *** [ggml/src/CMakeFiles/ggml.dir/build.make:123: ggml/src/ggml-vulkan-shaders.hpp] Error 127
make[1]: *** [CMakeFiles/Makefile2:1653: ggml/src/CMakeFiles/ggml.dir/all] Error 2
make: *** [Makefile:146: all] Error 2

@FranzKafkaYu
Copy link

I am getting some errors related to vulkan shaders as well

[ 2%] Generate vulkan shaders
/bin/sh: 1: vulkan-shaders-gen: not found
make[2]: *** [ggml/src/CMakeFiles/ggml.dir/build.make:123: ggml/src/ggml-vulkan-shaders.hpp] Error 127
make[1]: *** [CMakeFiles/Makefile2:1653: ggml/src/CMakeFiles/ggml.dir/all] Error 2
make: *** [Makefile:146: all] Error 2

same issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-unconfirmed critical severity Used to report critical severity bugs in llama.cpp (e.g. Crashing, Corrupted, Dataloss)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants