Uh oh!
There was an error while loading. Please reload this page.
build: fix const correctness in ggml-bitnet-mad - #418
Conversation
Darshan (darsh7807)
commented
Mar 8, 2026
Verified locally on macOS arm64 by forcing syntax checking of the AVX2 branch. On clean clang++ -target x86_64-apple-darwin -D__AVX2__ -std=c++17 -fsyntax-only -Iinclude -I./src -I./3rdparty/llama.cpp -I./3rdparty/llama.cpp/include -I./3rdparty/llama.cpp/ggml/include -I./3rdparty/llama.cpp/ggml/src src/ggml-bitnet-mad.cppThis reproduces: On this branch, the same command succeeds after changing |
Hannah Baldwin (habaldwin01)
commented
Mar 11, 2026
Confirming that this PR also fixes failing compilation on Debian 12 (AMD64). On a clean main branch, using the command Applying the patch fixes this and the package compiles successfully. I would greatly appreciate this being merged! |
Matthew Zipkin (pinheadmz)
commented
Mar 12, 2026
Same issue here, this patch got me past the error -- thanks! Ubuntu 24 / x86_64 / clang-20 |
Mike (alveusdev)
commented
Mar 12, 2026
Same issue. Can confirm patch resolves the compilation error |
Darshan (darsh7807)
commented
Mar 12, 2026
How do I contact maintainers to merge this PR? |
Leonardo Amaral (leleobhz)
commented
Mar 14, 2026
Same here: |
Summary
Fix a clang compiler error in
src/ggml-bitnet-mad.cppcaused by dropping const qualification from a pointer derived fromconst int8_t * y.Root cause
yis declared asconst int8_t *, soy + col * byis alsoconst int8_t *. The code assigned that expression toint8_t * y_col, which discards const qualification and fails to compile on clang.Change
int8_t * y_coltoconst int8_t * y_colVerification
#378(include/bitnet-lut-kernels.hmissing), so validation here was limited to the affected translation unit.Closes#407