Skip to content

Commit 7d6a551

Browse files
committed
Fix test
Signed-off-by: Chang Liu (Enterprise Products) <[email protected]>
1 parent e26d4e9 commit 7d6a551

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tests/unittest/_torch/attention/sparse/test_dsa_indexer.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1167,6 +1167,7 @@ def test_indexer_chunked_prefill(chunk_size, seq_lens_list, chunking_type):
11671167
f" Chunk {i}: Q[{chunk.token_start}:{chunk.token_end}] ({num_q} tokens), "
11681168
f"K[{chunk.k_token_start}:{chunk.k_token_end}] ({num_k} tokens)")
11691169

1170+
indexer._update_k_cache(k_fp8, k_scale, metadata_chunked)
11701171
topk_indices_chunked = indexer.sparse_attn_indexer(metadata_chunked,
11711172
hidden_states, q_fp8,
11721173
k_fp8, k_scale, weights)
@@ -1198,6 +1199,7 @@ def test_indexer_chunked_prefill(chunk_size, seq_lens_list, chunking_type):
11981199
f"✓ Created {num_baseline_chunks} chunk(s) (effectively non-chunked)"
11991200
)
12001201

1202+
indexer._update_k_cache(k_fp8, k_scale, metadata_baseline)
12011203
topk_indices_baseline = indexer.sparse_attn_indexer(metadata_baseline,
12021204
hidden_states, q_fp8,
12031205
k_fp8, k_scale, weights)

0 commit comments

Comments
 (0)