[ROCm][CI] Fix attention backend test flakiness from uninitialized KV cache memory (#31928)

Signed-off-by: Andreas Karatzas <akaratza@amd.com>
This commit is contained in:
Andreas Karatzas
2026-01-07 22:35:25 -06:00
committed by GitHub
parent c4041f37a4
commit 087a138963

View File

@@ -136,7 +136,7 @@ def create_and_prepopulate_kv_cache(
slot_mapping = common_attn_metadata.slot_mapping
# Create KV cache
kv_cache = torch.empty(
kv_cache = torch.zeros(
2, num_blocks, block_size, num_kv_heads, head_size, dtype=dtype, device=device
)
kv_cache_flat = kv_cache.view(2, -1, num_kv_heads, head_size)