Skip to content

[Bug] Build Failure: INT8 ConvRot code on master uses undeclared ggml functions #1870

Description

@ali0une

Git commit

bcc7e29

Operating System & Version

Debian 12

GGML backends

CUDA

Command-line arguments used

cmake .. --fresh -DSD_CUDA=ON && cmake --build . --config Release -j$(nproc) --clean-first

Steps to reproduce

build stable-diffusion.cpp

What you expected to happen

build OK

What actually happened

build failed

Logs / error messages / stack trace

build.log

Additional context / environment details

Summary

stable-diffusion.cpp master at bcc7e29 (PR #1857, "feat: support INT8 ConvRot safetensors") calls two ggml functions that do not exist in the current ggml submodule:

  • ggml_mul_mat_i8_tensorwise
  • ggml_quantize_i8_convrot

This causes hard compilation errors at ~91% build.

Commits

Repo Commit Description
stable-diffusion.cpp bcc7e29 (HEAD master) Added INT8 ConvRot safetensors support — calls new ggml functions
ggml (submodule) 3f85508c Current submodule pointer in master — does not have the functions
ggml (submodule) 7fa9a07c ggml commit that does provide the functions (used by int8_convrot branch)

The fix commit on stable-diffusion.cpp side is 36ea742 ("fix HIP build for INT8 convrot") on the int8_convrot branch — it bumps the ggml submodule from 3f85508c7fa9a07c. This branch has not been merged to master.

Errors

src/core/ggml_extend.hpp:1059: error: 'ggml_mul_mat_i8_tensorwise' was not declared in this scope
src/core/ggml_extend.hpp:1062: error: 'ggml_mul_mat_i8_tensorwise' was not declared in this scope
src/core/ggml_extend.hpp:3489: error: 'ggml_quantize_i8_convrot' was not declared in this scope

Workaround

Manually update the ggml submodule to the correct commit:

cd stable-diffusion.cpp/ggml
git fetch origin
git checkout 7fa9a07cf89771317377dad7c358ec4c0c2331cf
cd ../..
# Rebuild
rm -rf build && mkdir build && cd build
cmake .. --fresh -DSD_CUDA=ON
cmake --build . --config Release -j$(nproc) --clean-first

Or switch to the int8_convrot branch which already has everything aligned:

git checkout int8_convrot
git submodule update --init --recursive

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions