diff --git a/ggml/src/ggml-hrx/runtime/host-memory.cpp b/ggml/src/ggml-hrx/runtime/host-memory.cpp index b3281477f33f..23bd8913f1f3 100644 --- a/ggml/src/ggml-hrx/runtime/host-memory.cpp +++ b/ggml/src/ggml-hrx/runtime/host-memory.cpp @@ -2184,7 +2184,11 @@ void HostWeightCache::clear() { resident_bytes_ = 0; available_at_first_weight_ = 0; oversize_warned_ = false; - stats_ = {}; + // engine#2393: the live gauges follow the entries just dropped; hits, misses, evictions, materialized bytes and + // duplicate warnings are counts over the cache's life, which is what AMD's clear() keeps (9bf5871) and what + // tests/hrx-buffer-test.cpp asserts. The #327 merge had kept this branch's older `stats_ = {}`. + stats_.allocation_count = 0; + stats_.resident_bytes = 0; if (arena_ != nullptr) { hrx_buffer_release(arena_); arena_ = nullptr;