Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -168,12 +168,13 @@ def apply(
Paddle Cutlass compute Fused MoE.
"""
if layer.ep_size > 1:
if layer.fd_config.model_config.moe_phase.phase == "prefill" and layer.layer_idx == 0:
if layer.fd_config.scheduler_config.splitwise_role == "mixed":
is_moe_start_layer = layer.layer_idx == layer.fd_config.model_config.moe_layer_start_index
if layer.fd_config.model_config.moe_phase.phase == "prefill":
if layer.fd_config.scheduler_config.splitwise_role == "mixed" and is_moe_start_layer:
self.ep_prefill_runner.clean_low_latency_buffer()
return self.apply_ep_prefill(layer, x, gate)
else:
if layer.fd_config.scheduler_config.splitwise_role == "mixed" and layer.layer_idx == 0:
if layer.fd_config.scheduler_config.splitwise_role == "mixed" and is_moe_start_layer:
self.ep_decoder_runner.clean_low_latency_buffer()
return self.apply_ep_decode(layer, x, gate)
else:
Expand Down
Loading