File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -301,10 +301,10 @@ index e7d5a67cc..639e47163 100644
301301 out_hidden_states[begin_chunk_idx:end_chunk_idx],
302302diff --git a/python/sglang/srt/layers/moe/routed_experts_capturer.py b/python/sglang/srt/layers/moe/routed_experts_capturer.py
303303new file mode 100644
304- index 000000000..732f7859d
304+ index 000000000..7369f9dc9
305305--- /dev/null
306306+++ b/python/sglang/srt/layers/moe/routed_experts_capturer.py
307- @@ -0,0 +1,304 @@
307+ @@ -0,0 +1,308 @@
308308+ import logging
309309+ from abc import ABC
310310+ from contextlib import contextmanager
@@ -496,8 +496,12 @@ index 000000000..732f7859d
496496+ )
497497+
498498+ if get_moe_a2a_backend().is_deepep():
499+ + attn_tp_size = get_attention_tp_size() if is_dp_attention_enabled() else 1
499500+ self.gather_buffer = torch.empty(
500- + (self.device_cache.buffer.shape[0], self.device_cache.buffer.shape[2]),
501+ + (
502+ + self.device_cache.buffer.shape[0] * attn_tp_size,
503+ + self.device_cache.buffer.shape[2],
504+ + ),
501505+ dtype=torch.int32,
502506+ device=device,
503507+ )
You can’t perform that action at this time.
0 commit comments