Skip to content

Commit 35234cc

Browse files
committed
refactor: optimize phase detection logic in qwen3 moe forward pass.
1 parent fb410ee commit 35234cc

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

xllm/core/layers/npu/npu_qwen3_moe_decoder_layer_impl.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -896,9 +896,7 @@ torch::Tensor NpuQwen3MoeDecoderLayerImpl::forward(
896896
std::atomic<bool>* event_flag,
897897
int node_id) {
898898
atb::Status st;
899-
bool is_prefill = input_params.decode_seq_range.second !=
900-
input_params.q_seq_lens.size(0) - 1;
901-
if (is_prefill) {
899+
if (!input_params.batch_forward_type.is_decode()) {
902900
build_node_variant_pack(prefill_node_,
903901
x,
904902
cos_pos,

0 commit comments

Comments
 (0)