Skip to content

Conversation

@zccjjj
Copy link
Contributor

@zccjjj zccjjj commented Nov 20, 2025

Motivation

Implement low-latency version communication operators for pure D requests, and high-throughput version communication operators for P requests in centralized inference scenarios.

Modifications

Usage or Command

export MOE_FFN_USE_DENSE_INPUT=1

Accuracy Tests

Checklist

  • Add at least a tag in the PR title.
    • Tag list: [[FDConfig],[APIServer],[Engine], [Scheduler], [PD Disaggregation], [Executor], [Graph Optimization], [Speculative Decoding], [RL], [Models], [Quantization], [Loader], [OP], [KVCache], [DataProcessor], [BugFix], [Docs], [CI], [Optimization], [Feature], [Benchmark], [Others], [XPU], [HPU], [GCU], [DCU], [Iluvatar], [Metax]]
    • You can add new tags based on the PR content, but the semantics must be clear.
  • Format your code, run pre-commit before commit.
  • Add unit tests. Please write the reason in this PR if no unit tests.
  • Provide accuracy results.
  • If the current PR is submitting to the release branch, make sure the PR has been submitted to the develop branch, then cherry-pick it to the release branch with the [Cherry-Pick] PR tag.

@paddle-bot
Copy link

paddle-bot bot commented Nov 20, 2025

Thanks for your contribution!

self.group = group
self.num_local_experts = num_experts // ep_size
self.deepep_engine = None
self.deepep_engine = None # deepep_engine只调用dispatch, combine
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

注释都用英文

Comment on lines +932 to +974
if_only_decode = self.only_decode()
if (
self.fd_config.scheduler_config.splitwise_role == "mixed"
): # 集中式场景,phase默认初始化为prefill, 推理运行时不同类型的batch能够在此处实现phase切换
self.fd_config.model_config.moe_phase.phase = "decode" if if_only_decode else "prefill"

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only_decoder=self.forward_meta.len_info_cpu[0]<=0

permute_input,
token_nums_per_expert,
valid_token_num,
max(1, valid_token_num), # 确保空跑时也不为0
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

在算子moe_expert_ffn中支持valid_token_num=0的情况

@codecov-commenter
Copy link

codecov-commenter commented Nov 21, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (develop@6471dad). Learn more about missing BASE report.

Additional details and impacted files
@@            Coverage Diff             @@
##             develop    #5145   +/-   ##
==========================================
  Coverage           ?   57.86%           
==========================================
  Files              ?      317           
  Lines              ?    38315           
  Branches           ?     5727           
==========================================
  Hits               ?    22171           
  Misses             ?    14380           
  Partials           ?     1764           
Flag Coverage Δ
diff 57.86% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants