Skip to content

[XPU] support yiyan model w4a8C8/C16+TP4EP4/PD disaggregation+skip la…#7924

Open
zccjjj wants to merge 1 commit into
PaddlePaddle:developfrom
zccjjj:skipdev
Open

[XPU] support yiyan model w4a8C8/C16+TP4EP4/PD disaggregation+skip la…#7924
zccjjj wants to merge 1 commit into
PaddlePaddle:developfrom
zccjjj:skipdev

Conversation

@zccjjj
Copy link
Copy Markdown
Contributor

@zccjjj zccjjj commented May 25, 2026

…yer mix quant

Motivation

💡 If this PR is a Cherry Pick, the PR title needs to follow the format by adding the [Cherry-Pick] label at the very beginning and appending the original PR ID at the end. For example, [Cherry-Pick][CI] Add check trigger and logic(#5191)

💡 如若此PR是Cherry Pick,PR标题需遵循格式,在最开始加上[Cherry-Pick]标签,以及最后面加上原PR ID,例如[Cherry-Pick][CI] Add check trigger and logic(#5191)

Modifications

Usage or Command

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
Copy Markdown

paddle-bot Bot commented May 25, 2026

Thanks for your contribution!

@PaddlePaddle-bot
Copy link
Copy Markdown

PaddlePaddle-bot commented May 25, 2026

🤖 Paddle-CI-Agent | ci_status_monitor | 2026-05-26 00:16:36

CI报告基于以下代码生成(30分钟更新一次):


1 任务总览

Required 任务 10 个,当前 9 个已通过、1 个失败;阻塞合并的是 Run FastDeploy Unit Tests and Coverage / run_tests_with_coverage,失败原因为差异覆盖率未达到 80% 阈值。

总执行(rerun次数) 总任务 ✅ 通过 ❌ 失败 ⏳ 运行中 ⏸️ 等待中 跳过
41(0) 41 35 5 0 1 0

2 任务状态汇总

2.1 Required任务 : 9/10 通过

必选任务阻塞合并,失败需优先处理。

状态 任务 耗时 根因 修复建议 日志 重跑
Run FastDeploy Unit Tests and Coverage / run_tests_with_coverage 1h23m PR问题:差异覆盖率29%,新增分支未覆盖 补测3个变更文件覆盖未达标行 Job -
其余 9 个必选任务通过 - - - - -

2.2 可选任务 — 26/31 通过

可选任务不阻塞合并,失败仅供参考。

状态 任务 耗时 日志 重跑
Run iluvatar Tests / run_iluvatar_cases 2m48s Job -
xpu_coverage_report / xpu_coverage_combine 45s Job -
Check PR Template 20s Job -
Trigger Jenkins for PR 1m58s Job -
⏸️ CI_HPU - - -
其余 26 个可选任务通过 - - -

3 失败详情(仅 required)

Run FastDeploy Unit Tests and Coverage / run_tests_with_coverage — 覆盖率未达标(置信度: 高)

Run FastDeploy Unit Tests and Coverage / run_tests_with_coverage

  • 状态: ❌ 失败
  • 错误类型: 覆盖率未达标
  • 置信度: 高
  • 根因摘要: 差异覆盖率29%,新增分支未覆盖
  • 分析器: ci_analyze_unittest_fastdeploy

失败用例: 无。日志显示单元测试已通过(TEST_EXIT_CODE=0),失败发生在 Verify Code Coverage Threshold (80%)

根因详情:
CI 在生成差异覆盖率报告后以 COVERAGE_EXIT_CODE=9 退出,diff_coverage.json 显示本 PR 差异覆盖率为 29%,低于 80% 阈值。未覆盖行集中在本 PR 新增/修改的 fastdeploy/model_executor/layers/quantization/__init__.pyfastdeploy/model_executor/utils.pyfastdeploy/model_executor/layers/moe/moe.py 三个文件,因此判断为 PR 新增逻辑缺少单元测试覆盖。

覆盖率明细:

文件 差异覆盖率 未覆盖行
fastdeploy/model_executor/layers/quantization/__init__.py 50.0% 283, 287
fastdeploy/model_executor/utils.py 37.5% 443, 568, 572, 573, 575
fastdeploy/model_executor/layers/moe/moe.py 16.67% 312-316, 319-321, 357-358

关键日志:

All tests passed
Coverage generation failed (exit code 9)
GPU Patch Coverage Details:
"total_num_lines": 24,
"total_num_violations": 17,
"total_percent_covered": 29,
"num_changed_lines": 154
##[error]Process completed with exit code 9.

修复建议:

  1. tests/quantization/test_quantization_init.py 增加 XPU 平台分支用例,mock/patch current_platform.is_xpu() 为 true,验证 get_quantization_config("kvcache") 返回 XPUKvCacheQuantConfig,覆盖 __init__.py L283/L287。
  2. fastdeploy/model_executor/utils.py 增加或扩展单测,覆盖 XPU 下 v1_loader_support 对 w4a8 的支持分支(L443),以及 rename_offline_ckpt_suffix_to_fd_suffix 在 MoE w4a8/w4afp8 下将 quant_weightactivation_scale 映射到 weightin_scale 的分支(L568/L572-L575)。
  3. 扩展 tests/layers/test_w4a8_moe.py 中 W4A8 MoE 加载断言,覆盖 _load_in_scale_weight 的 reshape/cast/copy 路径以及 SHARD_ID_TO_SHARDED_DIM 为 None 时进入 in_scale loader 的分支(moe.py L312-L321、L357-L358)。

修复建议摘要: 补测3个变更文件覆盖未达标行

关联变更: fastdeploy/model_executor/layers/quantization/__init__.py L279-L287;fastdeploy/model_executor/utils.py L439-L443、L565-L575;fastdeploy/model_executor/layers/moe/moe.py L310-L321、L355-L358

链接: 查看日志

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 25, 2026

Codecov Report

❌ Patch coverage is 5.26316% with 72 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (develop@cc413e0). Learn more about missing BASE report.

Files with missing lines Patch % Lines
...cutor/layers/backends/xpu/quantization/kv_cache.py 0.00% 44 Missing ⚠️
fastdeploy/model_executor/layers/moe/moe.py 8.33% 10 Missing and 1 partial ⚠️
...odel_executor/layers/backends/xpu/moe/fused_moe.py 0.00% 6 Missing ⚠️
fastdeploy/model_executor/utils.py 25.00% 5 Missing and 1 partial ⚠️
...loy/model_executor/layers/quantization/__init__.py 25.00% 2 Missing and 1 partial ⚠️
...oy/model_executor/layers/backends/xpu/attention.py 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             develop    #7924   +/-   ##
==========================================
  Coverage           ?   63.98%           
==========================================
  Files              ?      467           
  Lines              ?    65023           
  Branches           ?     9973           
==========================================
  Hits               ?    41605           
  Misses             ?    20592           
  Partials           ?     2826           
Flag Coverage Δ
GPU 73.13% <16.66%> (?)
XPU 7.07% <0.00%> (?)

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