fix_moe_learable-score111#7903
Conversation
|
Thanks for your contribution! |
CI报告基于以下代码生成(30分钟更新一次): 1 任务总览Required 任务存在 2 个失败,均为 XPU case 日志上传阶段的 GitHub Actions Artifact 存储配额问题;PR 主测试任务
2 任务状态汇总2.1 Required任务 : 8/10 通过
2.2 可选任务 — 28/32 通过
3 失败详情(仅 required)xpu_4cards_case_test / run_xpu_4cards_cases — 基础设施(置信度: 高)xpu_4cards_case_test / run_xpu_4cards_cases
根因详情: 关键日志: 修复建议:
修复建议摘要: 清理/等待配额恢复后 rerun 关联变更: 未发现与 xpu_8cards_case_test / run_xpu_8cards_cases — 基础设施(置信度: 高)xpu_8cards_case_test / run_xpu_8cards_cases
根因详情: 关键日志: 修复建议:
修复建议摘要: 清理/等待配额恢复后 rerun 关联变更: 未发现与 |
PaddlePaddle-bot
left a comment
There was a problem hiding this comment.
🤖 Paddle-CI-Agent | pr_review |
2026-05-25 13:21:22
📋 Review 摘要
PR 概述:修复 noaux_tc 分支中可学习路由缩放因子(routed_scaling_factor_learnable)因被 moe_expert_dispatch 返回值覆盖而实际未生效的 bug
变更范围:fastdeploy/model_executor/layers/moe/fused_moe_cutlass_backend.py
影响面 Tag:[OP] [BugFix]
问题
| 级别 | 文件 | 概述 |
|---|---|---|
| 🟡 建议 | fused_moe_cutlass_backend.py |
其他 MoE backend(deepgemm / triton)中 routed_scaling_factor_learnable 缩放时序是否存在同类问题,需确认 |
| 📝 PR 规范 | — | 标题缺少官方 Tag,PR body 各 section 均为空 |
📝 PR 规范检查
标题 fix_moe_learable-score111 缺少官方 Tag,且 PR body 各段落均未填写。
标题建议(可直接复制):
[BugFix] Fix routed_scaling_factor_learnable applied to stale topk_weights in apply_tp noaux_tc branch
PR 描述建议(可直接复制,必须复刻 checklist §D2 模板的完整结构):
## Motivation
修复 `fused_moe_cutlass_backend.py` 中 `apply_tp` 的 `noaux_tc` 路径下,可学习缩放因子(`routed_scaling_factor_learnable`)实际未生效的 bug。原实现将缩放应用于 `get_moe_scores` 的返回值,但其后 `moe_expert_dispatch` 会重新输出新的 `topk_weights` 和 `topk_idx`,导致之前的缩放被覆盖丢失。
## Modifications
- `fastdeploy/model_executor/layers/moe/fused_moe_cutlass_backend.py`:将 `apply_tp` 的 `noaux_tc` 分支中可学习缩放因子的应用位置,从 `get_moe_scores` 调用后移至 `moe_expert_dispatch` 调用后,确保缩放作用于最终实际使用的 `topk_weights`。
## Usage or Command
N/A
## Accuracy Tests
N/A
## Checklist
- [x] 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.总体评价
本 PR 修复思路正确,将可学习缩放因子的应用时机从 get_moe_scores 之后调整到 moe_expert_dispatch 之后,逻辑上解决了缩放未实际生效的问题。建议同步确认 deepgemm / triton 等其他 MoE backend 的相同路径是否存在同类缩放时序问题。
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #7903 +/- ##
==========================================
Coverage ? 63.69%
==========================================
Files ? 463
Lines ? 64729
Branches ? 9932
==========================================
Hits ? 41226
Misses ? 20714
Partials ? 2789
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Motivation
Modifications
Usage or Command
Accuracy Tests
Checklist
[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]]pre-commitbefore commit.releasebranch, make sure the PR has been submitted to thedevelopbranch, then cherry-pick it to thereleasebranch with the[Cherry-Pick]PR tag.