-
Notifications
You must be signed in to change notification settings - Fork 681
[XPU] [CI] Xpu CI Refactor #5932
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
|
Thanks for your contribution! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
本PR对XPU CI测试框架进行了重大重构,主要变更包括:
目的: 重构XPU CI流程,将原有的单一工作流拆分为模块化的可复用工作流,并新增大量测试用例。
主要改动:
- 将CI工作流拆分为clone、build、4卡测试和8卡测试四个独立的可复用工作流
- 新增pytest测试框架,包含4卡和8卡两套完整的测试用例
- 添加conftest.py提供通用的测试辅助函数
- 新增多种场景的测试用例:PD分离、EP并行、MTP模式、VL模型、logprobs等
Reviewed changes
Copilot reviewed 5 out of 18 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/ci_xpu.yml | 重构主工作流,改为编排调用子工作流,实现模块化CI流程 |
| .github/workflows/_build_xpu.yml | 新增XPU构建工作流,负责编译和上传wheel包 |
| .github/workflows/_xpu_4cards_case_test.yml | 新增4卡测试工作流,在XPU-P800-4Cards runner上执行测试 |
| .github/workflows/_xpu_8cards_case_test.yml | 新增8卡测试工作流,在XPU-P800-8Cards runner上执行测试 |
| tests/xpu_ci/4cards_cases/conftest.py | 新增4卡测试通用配置,提供进程管理、健康检查等辅助函数 |
| tests/xpu_ci/8cards_cases/conftest.py | 新增8卡测试通用配置,与4卡版本基本相同 |
| tests/xpu_ci/4cards_cases/test_*.py | 新增10个4卡测试用例,覆盖V1模式、W4A8量化、VL模型、MTP、EP并行、PD分离、logprobs等场景 |
| tests/xpu_ci/8cards_cases/test_*.py | 新增2个8卡测试用例,测试PD分离的TP4EP4和TP1EP4配置 |
.github/workflows/_build_xpu.yml
Outdated
| ' | ||
| - name: Package Upload | ||
| id: set_output | ||
| env: |
Copilot
AI
Jan 7, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
语法错误:YAML文件中 env: 关键字后缺少值。第166行只有 env: 而没有定义任何环境变量,这会导致YAML解析错误。如果不需要环境变量,应该删除这一行;如果需要,应该添加相应的变量定义。
| env: |
.github/workflows/_build_xpu.yml
Outdated
| bash custom_ops/xpu_ops/download_dependencies.sh develop | ||
| export CLANG_PATH=$(pwd)/custom_ops/xpu_ops/third_party/xtdk | ||
| export XVLLM_PATH=$(pwd)/custom_ops/xpu_ops/third_party/xvllm | ||
| bash build.sh | ||
| ls ./dist/*.whl | ||
| ' |
Copilot
AI
Jan 7, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
代码块结束位置缺少右引号。第159行之后的bash脚本应该有对应的闭合引号 ',但是直接跳到了第163行。这会导致shell脚本执行错误。
.github/workflows/ci_xpu.yml
Outdated
| @@ -1,86 +1,43 @@ | |||
| name: CI_XPU | |||
|
|
|||
| name: CI-XPU | |||
Copilot
AI
Jan 7, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR描述信息不完整。根据项目规范,PR描述至少应该解释为什么要进行这些修改以及解决了什么问题。建议补充以下内容:
- 重构的背景和动机
- 主要改进点(例如:将单个工作流拆分为多个可复用的工作流、增加了测试用例等)
- 对CI流程的影响
- 测试验证情况
| python ${push_file} fastdeploy*.whl ${target_path} | ||
| target_path_stripped="${target_path#paddle-github-action/}" | ||
| WHEEL_PATH=https://paddle-github-action.bj.bcebos.com/${target_path_stripped}/${fd_wheel_name} | ||
| echo "wheel_path=${WHEEL_PATH}" >> $GITHUB_OUTPUT No newline at end of file |
Copilot
AI
Jan 7, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
缺少环境变量 GITHUB_OUTPUT 的存在性检查。如果在本地或非GitHub Actions环境中运行此脚本,$GITHUB_OUTPUT 可能未定义,导致脚本失败。建议添加环境变量检查或使用更健壮的输出方式。
| echo "wheel_path=${WHEEL_PATH}" >> $GITHUB_OUTPUT | |
| if [ -n "${GITHUB_OUTPUT:-}" ]; then | |
| echo "wheel_path=${WHEEL_PATH}" >> "$GITHUB_OUTPUT" | |
| else | |
| # Fallback for non-GitHub Actions environments: print to stdout | |
| echo "GITHUB_OUTPUT is not set. wheel_path=${WHEEL_PATH}" | |
| fi |
.github/workflows/ci_xpu.yml
Outdated
| @@ -1,86 +1,43 @@ | |||
| name: CI_XPU | |||
|
|
|||
| name: CI-XPU | |||
Copilot
AI
Jan 7, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR标题缺少必要的标签格式。根据项目规范,PR标题应该遵循 [标签]描述 的格式。建议修改为:[XPU][CI] XPU CI Refactor,明确标注这是XPU和CI相关的改动。
| """ | ||
| 停止所有相关进程(最小改动版,避免误杀 pytest) | ||
| """ | ||
| xpu_id = get_xpu_id() # noqa: F841 |
Copilot
AI
Jan 7, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Variable xpu_id is not used.
| xpu_id = get_xpu_id() # noqa: F841 |
| # 真正 kill | ||
| for pid in safe_pids: | ||
| subprocess.run(f"kill -9 {pid}", shell=True, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) | ||
| except Exception: |
Copilot
AI
Jan 7, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'except' clause does nothing but pass and there is no explanatory comment.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #5932 +/- ##
==========================================
Coverage ? 67.02%
==========================================
Files ? 348
Lines ? 44648
Branches ? 6868
==========================================
Hits ? 29926
Misses ? 12513
Partials ? 2209
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.