Skip to content

remove unused code#7961

Open
zhoutianzi666 wants to merge 7 commits into
PaddlePaddle:developfrom
zhoutianzi666:haha11
Open

remove unused code#7961
zhoutianzi666 wants to merge 7 commits into
PaddlePaddle:developfrom
zhoutianzi666:haha11

Conversation

@zhoutianzi666
Copy link
Copy Markdown
Collaborator

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 30, 2026

Thanks for your contribution!

PaddlePaddle-bot

This comment was marked as outdated.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 30, 2026

Codecov Report

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

Additional details and impacted files
@@            Coverage Diff             @@
##             develop    #7961   +/-   ##
==========================================
  Coverage           ?   67.63%           
==========================================
  Files              ?      467           
  Lines              ?    65191           
  Branches           ?    10008           
==========================================
  Hits               ?    44094           
  Misses             ?    18272           
  Partials           ?     2825           
Flag Coverage Δ
GPU 77.89% <ø> (?)
XPU 7.08% <ø> (?)

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.

PaddlePaddle-bot

This comment was marked as outdated.

@PaddlePaddle-bot
Copy link
Copy Markdown

PaddlePaddle-bot commented May 30, 2026

🤖 Paddle-CI-Agent | ci_status_monitor | 2026-05-31 18:22:59

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


1 任务总览

存在 1 个 Required 失败任务,需处理后方可合并。

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

2 任务状态汇总

2.1 Required任务 : 9/10 通过

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

状态 任务 耗时 根因 修复建议 日志 重跑
Run FastDeploy Unit Tests and Coverage / run_tests_with_coverage 1h31m 不稳定问题:IPC模式KV cache传输挂起,请求全部超时60s 与PR代码无关,请 rerun Job -
其余 9 个必选任务通过 - - - - -

2.2 可选任务 — 28/32 通过

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

状态 任务 耗时 日志 重跑
Run iluvatar Tests / run_iluvatar_cases 2m27s Job -
Check PR Template 26s Job -
CI_HPU 1h4m Job -
Trigger Jenkins for PR 17s Job -
其余 28 个可选任务通过 - - -

3 失败详情(仅 required)

Run FastDeploy Unit Tests and Coverage / run_tests_with_coverage — 测试失败(置信度: 中)

Run FastDeploy Unit Tests and Coverage / run_tests_with_coverage

  • 状态: ❌ 失败
  • 错误类型: 测试失败
  • 置信度: 中
  • 根因摘要: IPC模式KV cache传输挂起,请求全部超时60s
  • 分析器: ci_analyze_unittest_fastdeploy

失败用例:

测试 错误 根因
e2e/test_ernie_03b_pd_router_v1_ipc.py::test_non_chat_usage_non_stream AttributeError: 'NoneType' object has no attribute 'json' send_request() 返回 None(HTTP请求60s超时)

根因详情:
日志显示 prefill worker 成功将任务通过 zmq 发送至 decode(splitwise_connector.log 记录 cache_sync 确认,dest_block_ids 已分配),但 IPC 模式下 KV cache 实际数据传输挂起,导致 decode 无法完成推理,每个请求均在 60 秒后被中止(Receive abort request)。此后 multiprocessing Manager 队列操作抛出 BrokenPipeError

关键日志:

# splitwise_connector.log(prefill)
17:17:24 send_splitwise_tasks: protocol=rdma, addr=10.63.64.228:8639, task=chatcmpl-ccdec929
17:17:24 _process_message: cache_sync task: {'dest_block_ids': [0, 1, 2]}
# ↑ decode已确认,但60秒后请求被abort

# fastdeploy.log(decode)
17:18:24 Receive abort request, req_id: chatcmpl-ccdec929::n::0
17:21:27 ERROR common_engine.py BrokenPipeError: [Errno 32] Broken pipe

修复建议:

  1. 本次失败与 PR 代码变更无关(PR 仅删除 CUDA 注意力 kernel 中未使用的模板参数 IS_SYSTEM/partition_kv/num_frags_y,不影响 IPC 传输逻辑),建议直接 rerun 该 Job
  2. 若反复失败,排查 CI runner 的 /dev/shm IPC 共享内存可用空间及 PD 分离 splitwise 传输稳定性

修复建议摘要: 与PR无关,请 rerun;如反复失败查IPC共享内存

关联变更: PR 仅修改 custom_ops/gpu_ops/append_attn/*.cuh(CUDA kernel 模板参数),未涉及 IPC 传输代码
链接: 查看日志

@zhoutianzi666 zhoutianzi666 changed the title Haha11 remove useless code May 31, 2026
@zhoutianzi666 zhoutianzi666 changed the title remove useless code remove unused code May 31, 2026
PaddlePaddle-bot

This comment was marked as outdated.

PaddlePaddle-bot

This comment was marked as outdated.

Copy link
Copy Markdown

@PaddlePaddle-bot PaddlePaddle-bot left a comment

Choose a reason for hiding this comment

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

🤖 Paddle-CI-Agent | pr_review | 2026-05-31 16:29:31

📋 Review 摘要

PR 概述:移除 mask_s 函数中未使用的模板参数 partition_kvnum_frags_yIS_SYSTEM,消除对应的死代码分支。
变更范围custom_ops/gpu_ops/append_attn/
影响面 Tag[OP]

问题

未发现阻塞性问题。

📝 PR 规范检查

PR 标题和描述均不合规:标题缺少 Tag 且无实际描述;描述各段落为空。

标题建议(可直接复制):

  • [OP] Remove unused IS_SYSTEM template parameter from mask_s
PR 描述建议(点击展开,可直接复制)
## Motivation

Remove dead code in append attention kernel. The `IS_SYSTEM` template parameter in `mask_s` function was never instantiated with `true` by any caller, making the corresponding branch unreachable.

## Modifications

- Removed `IS_SYSTEM` template parameter (defaulted to `false`) from `mask_s` in `append_attention_func.cuh`
- Eliminated the `if constexpr (IS_SYSTEM)` dead code branch, keeping only the active `!IS_SYSTEM` logic
- Cleaned up redundant parentheses in `mask_check_iteration` calculation in `multiquery_attention_c16_impl.cuh`

## Usage or Command

N/A

## Accuracy Tests

N/A (pure refactoring, no behavioral change)

## 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.
- [x] Format your code, run `pre-commit` before commit.
- [x] 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 是纯重构变更,移除了从未被实例化为 trueIS_SYSTEM 模板分支和两个未使用的模板参数(partition_kvnum_frags_y),逻辑等价且安全。建议补充 PR 标题 Tag 和描述以符合项目规范。

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