[Misc] Add debug logs (#33931)
Signed-off-by: NickLucche <nlucches@redhat.com>
This commit is contained in:
@@ -324,6 +324,7 @@ class TpKVTopology:
|
|||||||
kv_cache_shape = self.attn_backend.get_kv_cache_shape(
|
kv_cache_shape = self.attn_backend.get_kv_cache_shape(
|
||||||
num_blocks=1, block_size=_MOCK_BLOCK_SIZE, num_kv_heads=1, head_size=1
|
num_blocks=1, block_size=_MOCK_BLOCK_SIZE, num_kv_heads=1, head_size=1
|
||||||
)
|
)
|
||||||
|
logger.debug("Test kv_cache_shape: %s", kv_cache_shape)
|
||||||
# Non-MLA backends caches have 5 dims [2, num_blocks, H,N,D],
|
# Non-MLA backends caches have 5 dims [2, num_blocks, H,N,D],
|
||||||
# we just mock num_blocks to 1 for the dimension check below.
|
# we just mock num_blocks to 1 for the dimension check below.
|
||||||
self._is_kv_layout_blocks_first = (
|
self._is_kv_layout_blocks_first = (
|
||||||
@@ -337,6 +338,7 @@ class TpKVTopology:
|
|||||||
)
|
)
|
||||||
|
|
||||||
if self._cross_layers_blocks:
|
if self._cross_layers_blocks:
|
||||||
|
logger.debug("Using cross-layer KV cache")
|
||||||
# prepend layers dimension
|
# prepend layers dimension
|
||||||
_MOCK_NUM_LAYERS = 80
|
_MOCK_NUM_LAYERS = 80
|
||||||
kv_cache_shape = (_MOCK_NUM_LAYERS,) + kv_cache_shape
|
kv_cache_shape = (_MOCK_NUM_LAYERS,) + kv_cache_shape
|
||||||
|
|||||||
@@ -1354,6 +1354,9 @@ class NixlConnectorWorker:
|
|||||||
if base_addr in seen_base_addresses:
|
if base_addr in seen_base_addresses:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
logger.debug(
|
||||||
|
"Registering layer %s with cache shape: %s", layer_name, cache.shape
|
||||||
|
)
|
||||||
kernel_block_size = cache.shape[self.kv_topo.block_size_position]
|
kernel_block_size = cache.shape[self.kv_topo.block_size_position]
|
||||||
if self.block_size != kernel_block_size:
|
if self.block_size != kernel_block_size:
|
||||||
logger.info_once(
|
logger.info_once(
|
||||||
|
|||||||
Reference in New Issue
Block a user