From e5c6715003da433da5cf57d143fc5794f9d5c942 Mon Sep 17 00:00:00 2001 From: HAI Date: Fri, 15 Nov 2024 21:24:42 -0800 Subject: [PATCH] Fix core (MI300X) with --enable-overlap (#2048) --- python/sglang/srt/managers/schedule_batch.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/sglang/srt/managers/schedule_batch.py b/python/sglang/srt/managers/schedule_batch.py index 0d57abdd2..cc72663cd 100644 --- a/python/sglang/srt/managers/schedule_batch.py +++ b/python/sglang/srt/managers/schedule_batch.py @@ -588,14 +588,14 @@ class ScheduleBatch: ) if not decoder_out_cache_loc: - self.out_cache_loc = torch.empty(0, dtype=torch.int32).to( + self.out_cache_loc = torch.zeros(0, dtype=torch.int32).to( self.device, non_blocking=True ) else: self.out_cache_loc = torch.cat(decoder_out_cache_loc) if not encoder_out_cache_loc: - self.encoder_out_cache_loc = torch.empty(0, dtype=torch.int32).to( + self.encoder_out_cache_loc = torch.zeros(0, dtype=torch.int32).to( self.device, non_blocking=True ) else: