[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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user