From ace730db48c6d9b209dea9cad3c5b651c75aabde Mon Sep 17 00:00:00 2001 From: Arik Date: Fri, 29 May 2026 15:18:02 +0800 Subject: [PATCH] [AMD] Work around HIP TPOT regression from Event.wait() in MTP seq lens resolution (#26672) --- python/sglang/srt/managers/overlap_utils.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/python/sglang/srt/managers/overlap_utils.py b/python/sglang/srt/managers/overlap_utils.py index fa3bb5c4e..2c9b926d9 100644 --- a/python/sglang/srt/managers/overlap_utils.py +++ b/python/sglang/srt/managers/overlap_utils.py @@ -204,7 +204,11 @@ class FutureMap: if fi is None: return if self.publish_ready is not None: - self.publish_ready.wait() + if _is_hip: + # Temporary workaround: Event.wait() regresses TPOT on AMD MI355. + self.publish_ready.synchronize() + else: + self.publish_ready.wait() batch.seq_lens = self.new_seq_lens_buf[fi] if self.fwd_prepare_d2h_stream is None or self.publish_ready is None: