Skip to content

Commit 34eda38

Browse files
Sulfur6Zqy11AniZpZTianyuZhang1214ch-wan
committed
Complete SBO refactor.
Co-authored-by: Zqy11 <[email protected]> Co-authored-by: AniZpZ <[email protected]> Co-authored-by: TianyuZhang1214 <[email protected]> Co-authored-by: ch-wan <[email protected]>
1 parent 4aeba66 commit 34eda38

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

python/sglang/srt/models/deepseek_v2.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1014,9 +1014,10 @@ def forward_deepep(
10141014
topk_output = self.topk.empty_topk_output(hidden_states.device)
10151015

10161016
if sbo_overlap_dispatch_flag:
1017+
shared_output = None
10171018

10181019
def _deepep_dispatch_hook(dispatcher: BaseDispatcher):
1019-
global shared_output
1020+
nonlocal shared_output
10201021
shared_output = self._forward_shared_experts(hidden_states)
10211022
for handle in deepep_dispatch_hook_handle:
10221023
handle.remove()

0 commit comments

Comments
 (0)