[ROCm] Synchronize sparse MLA metadata before graph replay (#47404)

Signed-off-by: zihaomu <zmu@amd.com>
This commit is contained in:
ZihaoMu
2026-07-09 14:59:56 -05:00
committed by GitHub
parent 2ded1b24e7
commit bbb0f945ff
2 changed files with 128 additions and 0 deletions
@@ -566,6 +566,9 @@ class ROCMAiterMLASparseMetadataBuilder(
uni_seqlen_qo=1,
fast_mode=True,
)
# The persistent metadata buffers are read by graph replay. Order
# the async metadata write before the graph-captured decode kernel.
torch.cuda.current_stream(self.device).synchronize()
self._prev_metadata_key = metadata_key
metadata = ROCMAiterMLASparseMetadata(