Skip to content

Compile bug: libggml-vulkan.so reproducible builds issue #11306

@bmwiedemann

Description

@bmwiedemann

Git commit

667d728

Operating systems

Linux

GGML backends

Vulkan

Problem description & steps to reproduce

I'm compiling the llamacpp openSUSE package and found that the libggml-vulkan.so differs in every build.

My analysis points to
https://github.com/ggerganov/llama.cpp/blob/bd38dde/ggml/src/ggml-vulkan/vulkan-shaders/vulkan-shaders-gen.cpp#L502
as the place where some sorting is missing to provide deterministic output.

First Bad Commit

No response

Compile command

we build with cmake - see https://github.com/bmwiedemann/openSUSE/blob/0da890b/packages/l/llamacpp/llamacpp.spec#L123 for details.

Relevant log output

Generated source-code varied (randomly) thusly:

/home/abuild/rpmbuild/BUILD.unsorted/llamacpp-4501/build/ggml/src/ggml-vulkan/ggml-vulkan-shaders.cpp
@@ -1,8 +1,892 @@
 #include "ggml-vulkan-shaders.hpp"
 
-unsigned char matmul_f16_f32_aligned_fp32_data[10276] = {
+unsigned char matmul_q4_1_f16_fp32_data[10564] = {
...

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions