[BugFix][Core] free_blocks: restore prepend (LIFO) reuse order when prefix caching is off (#51482)

Signed-off-by: theminghuang <theminghuang@gmail.com>
Signed-off-by: Ming Huang <mhhua@google.com>
This commit is contained in:
Ming Huang
2026-08-11 03:56:25 +00:00
committed by GitHub
parent 0914ed2e81
commit 07443bea29
+1 -1
View File
@@ -732,7 +732,7 @@ class BlockPool:
if block.ref_cnt == 0 and not block.is_null:
# When caching is disabled we always append for better
# GPU cache locality from reusing recently used blocks
if block.block_hash is None and self.enable_caching:
if block.block_hash is None or not self.enable_caching:
blocks_without_hash.append(block)
else:
blocks_with_hash.append(block)