Skip to content

Commit 8150b9c

Browse files
authored
Merge branch 'develop' into fastdeploy_v100
2 parents cf6e5c9 + c776d48 commit 8150b9c

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

custom_ops/gpu_ops/noaux_tc_redundant.cu

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ std::vector<paddle::Tensor> NoauxTcRedundant(
6161
redundant_ep_rank_num_plus_one,
6262
stream);
6363

64-
return {scores, topk_values, topk_indices};
64+
// Return 4 values to match PD_BUILD_STATIC_OP Outputs definition
65+
return {scores, topk_values, topk_indices, tokens_per_expert_stats_list};
6566
}
6667

6768
std::vector<paddle::DataType> NoauxTcRedundantInferDtype(

fastdeploy/model_executor/layers/moe/moe.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,9 @@ def get_moe_scores(
104104
routed_scaling_factor,
105105
)
106106
else:
107-
scores, topk_values, topk_idx = noaux_tc_redundant(
107+
# noaux_tc_redundant returns 4 values: scores, topk_values, topk_idx,
108+
# and tokens_per_expert_stats_list_out (inplace updated)
109+
scores, topk_values, topk_idx, _ = noaux_tc_redundant(
108110
scores,
109111
scores_with_bias,
110112
expert_id_to_ep_rank_array,

0 commit comments

Comments
 (0)