From 585ad55e0c70dd79b45a2e2be5987a49623eea6d Mon Sep 17 00:00:00 2001 From: agent Date: Mon, 9 Nov 2026 08:52:26 -0400 Subject: [PATCH] ggml-hrx: the forward declaration says bool, matching the definition, so the pin builds again `main` cannot be compiled with `GGML_HRX=ON` at 8f124f906. Two merges each added a forward declaration of the same function - #252's `static void device_free_total(...)` and #240's `static bool ...` - and `void`/`bool` is an ambiguous redeclaration: ggml-hrx.cpp:517:13: error: ambiguating new declaration of 'bool {anonymous}::device_free_total(ggml_backend_hrx_device_context*, size_t&, size_t&)' ggml-hrx.cpp:383:13: note: old declaration 'void {anonymous}::device_free_total(ggml_backend_hrx_device_context*, size_t&, size_t&)' The definition is `bool` (it reports whether the driver counters were available), so the `void` declaration is the wrong one. Both hunks are textually far apart, which is why the merge was clean and the break is only visible when the backend is compiled - and CI never compiles it, because `GGML_HRX=ON` wants the private runtime. One word. `ggml-hrx.cpp` now compiles, and this is the same line that let the #1502 work build llama-cli end to end on 1bit/1502-host-term. scope: the declaration's type. No behaviour change; the function, its callers and its definition are untouched. --- ggml/src/ggml-hrx/ggml-hrx.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ggml/src/ggml-hrx/ggml-hrx.cpp b/ggml/src/ggml-hrx/ggml-hrx.cpp index 705dcc54155a..b45dd2abe0d6 100644 --- a/ggml/src/ggml-hrx/ggml-hrx.cpp +++ b/ggml/src/ggml-hrx/ggml-hrx.cpp @@ -380,7 +380,11 @@ static const ggml_backend_buffer_i buffer_i = { // engine #1502 (#251) calls this from buffer_alloc, eight hundred lines above its definition, with no declaration in // scope - so the translation unit does not compile ("'device_free_total' was not declared in this scope"). One forward // declaration is enough; the definition and its callers are unchanged. -static void device_free_total(ggml_backend_hrx_device_context * device_ctx, size_t & free_bytes, size_t & total_bytes); +// The declaration must match the definition's type: it is `bool` (it reports whether the driver counters were +// available). Two merges each added a forward declaration - #252's above, #240's `bool` one further down - and the +// `void`/`bool` pair is an ambiguous redeclaration, so the translation unit fails to compile at the `bool` declaration +// and the pin builds for nobody. One word, and every lane that builds this pin is unblocked. +static bool device_free_total(ggml_backend_hrx_device_context * device_ctx, size_t & free_bytes, size_t & total_bytes); static ggml_backend_buffer_t buffer_alloc(ggml_backend_buffer_type_t buft, size_t size) { ggml::hrx::onebit::poison_selftest(); // no-op unless GGML_HRX_POISON_SELFTEST=1