[ROCm] [Bugfix] Preserve CPU query offsets during capture (#51585)

Signed-off-by: Aakif Nawaz <aakif.nawaz@amd.com>
This commit is contained in:
akii96
2026-08-20 12:33:37 +08:00
committed by GitHub
parent 9b2aef5124
commit cd5035379c
+2 -4
View File
@@ -103,11 +103,9 @@ class RocmAttentionMetadataBuilder(AttentionMetadataBuilder[RocmAttentionMetadat
# slow, so here we set it to 1.
attn_metadata.seq_lens.fill_(1)
# Here we set the query start locs to 0. This is to
# cover up an invalid memory access in the prefix_prefil kernel
# that we run into during graph capture (#25985)
# Zero device query start locations to avoid invalid memory access in
# the prefix prefill kernel during graph capture (#25985).
common_attn_metadata.query_start_loc.zero_()
common_attn_metadata.query_start_loc_cpu.zero_()
return attn_metadata