已合并
fix:删除FIA冗余代码 #459
yjy_ac创建于 7月16日
fix:删除FIA冗余代码 #459
已合并
yjy_ac创建于 7月16日
yjy_ac
yjy_ac成员
7月16日

Which issue(s) this PR fixes or accomplishes

Fixes #323

关联 Issue:https://gitcode.com/Ascend/MindIE-SD/issues/323

Purpose

删除 FIA arch35 的重复内核副本,把实现统一到 csrc/ops/fused_infer_attention_score/op_kernel/eagle_common/op_kernel/arch35

dev 上同一套 arch35 kernel / tiling / vf 头文件同时存在于正式路径、csrc/ops/common/op_kernel/arch35/ 以及 eagle_common/common/。多副本会漂移;IFA / PFA 还用 #if __has_include 兜底到 ops/common,缺文件时可能静默编到过期副本。

本 PR 不改 FIA / IFA / PFA 的运行时算法与精度路径,只收口源文件与 include。

改动范围(249 files, +35 / -142449):

模块 范围 说明
删除重复副本 csrc/ops/common/op_kernel/arch35/(100 个文件) 删除与 eagle_common 重复的 arch35 kernel / tiling / vf
删除重复副本 .../eagle_common/common/(133 个文件) 删除另一套未使用的 common 副本
Host include fia_tiling_*.hfused_infer_attention_score_tiling_impl.h、IFA/PFA *_tiling_v2.h include 改到 eagle_common/op_kernel/arch35
IFA / PFA 入口 dummy / entry / processor / zero_output 等 去掉 common 兜底;正式路径缺失则 #error
Kernel 自身 flash_attention_score_antiquant_kernel.hinfer_flash_attention_sparse.h 去掉指向已删 common 树的 __has_include 分支
UT 编译 csrc/ops/fused_infer_attention_score/tests/ut/CMakeLists.txt 增加 FIA_EAGLE_KERNEL_DIR include

Test Plan

  1. 编译验证
    • 按仓内流程编译 FIA / IFA / PFA(build/build_ops.sh 或等价 AscendC 构建)
    • 确认 include 收口到 eagle_common/op_kernel/arch35 后可过编;正式路径缺失应编译期 #error,不再回退 ops/common/op_kernel/arch35
  2. FIA arch35 tiling UT
    • bash tests/ops/fused_infer_attention_score/run_fia_arch35_ut.sh
    • 该 UT 的 CMake 已增加 eagle kernel include,需确认能配置、编译并跑通
  3. FIA Python 接口(有 NPU 时)
    • pytest tests/ops/fused_infer_attention_score/test_fused_infer_attention_score_v2.py -v

Test Report

测试用例通过
image.png

likedislike
Pull Request已成功合入, 合并人@ascend-robot
(感谢 yjy_ac 的贡献)
yjy_acyjy_ac成员
7月16日 创建了 pull request,commit 9db76777
atomgit-bot
atomgit-bot
7月16日 评论:

🤖 正在生成合并请求摘要,请稍候…

likedislike
atomgit-bot
atomgit-bot
7月16日 评论:

🤖 AI 代码检视正在进行中,请稍候…

likedislike
ascend-robotascend-robot成员
7月16日 添加了label:ascend-cla/yes
ascend-robot
ascend-robot成员
7月16日 评论:

Thanks for your pull-request.
The full list of commands accepted by me can be found at here.
You can get sig-info at here.
You can self-configure the PR merge rules for this repository. For more details, please refer to Here.


PR Approval Progress

Congratulations! All modules have met the lgtm and approve requirements.

Module Approval Details

module lgtm status approve status
repo-Ascend/MindIE-SD weixin_44144262, changetheway (2/2) weixin_44144262 (1/1)

💡 Tip:

  • Committer can comment /approve or /lgtm
  • Commenting /approve implies both code review (lgtm) and intent to merge (approve)

CLA Signature Pass

yjy_ac, thanks for your pull request. All authors of the commits have signed the CLA. 👍

likedislike
此处折叠了55条消息 查看更多
ascend-robotascend-robot成员
21 小时前 添加了label:approved
lanwangli成员
21 小时前 评论:

/merge

likedislike
ascend-robotascend-robot成员
21 小时前 添加了label:keeper_approved
ascend-robotascend-robot成员
21 小时前 关闭了关联的issue
ascend-robotascend-robot成员
21 小时前 合入了pull request