已合并
[Feature][op][eqbsa-01] support CANN msprof include layout #512
[Feature][op][eqbsa-01] support CANN msprof include layout #512
已合并
lanwangli创建于 23 天前
lanwangli成员
23 天前

Which issue(s) this PR fixes or accomplishes

Fix part of #197

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

Purpose

上库 eagle_quant_block_sparse_attention 算子和 plugin 适配,关联 RFC: #197。

该算子用于叠加量化和块稀疏 Attention 能力:Q/K 采用 INT8 量化,P/V 相关路径采用 FP8 低精度表示,并通过 block sparse mask/index 降低长序列 Attention 的计算和访存开销。

CANN 9.1 将 prof_api.h 挪到 msprof/profiling/prof_common.h 仍在 msprof/toolchain/。本 PR 仅补齐这两个 include 目录,使自定义算子编译能解析 msprof 头文件。该改动对所有走 intf_pub 的自定义算子都有效,不是 eqbsa 专用逻辑。

Scope

  • csrc/ops/cmake/intf_pub.cmake

Overall Sequence

  1. 构建兼容性: !512
  2. 算子源码 + attention infra + 构建启用: !514
  3. Plugin API + golden 测试: !515

Merge Safety

该 PR 只改 include 路径,不新增算子源码、不启用构建、不暴露 API。可独立合入,不会把 eqbsa 编进产物。CANN 9.1 环境下后续算子编译依赖本 PR。

Test Plan

  1. 改动范围核对
    • intf_pub.cmake 增加 msprof/toolchainmsprof/profiling
  2. 后续编译依赖
    • 算子真正编译发生在 !514 合入之后

Test Report

测试环境: Ascend 950,CANN 9.x

测试项 命令/步骤 结果
include-path-only 核对 intf_pub.cmake 仅增加 msprof 两个子目录
eqbsa 上机 Ascend 950 上完成 eqbsa 精度验证 ✅ 已验证

Ascend 950 golden 精度测试通过

likedislike
Pull Request已成功合入, 合并人@ascend-robot
(感谢 lanwangli 的贡献)
Llanwangli成员
23 天前 创建了 pull request,commit 0e2944a6
Llanwangli成员
23 天前 关联了issue:[RFC]: 上库 eagle_quant_block_sparse_attention 算子和 plugin 适配
atomgit-bot
atomgit-bot
23 天前 评论:

变更摘要

该 PR 是 eqbsaeagle_quant_block_sparse_attention)算子上库顺序中的构建兼容性提交,仅调整 csrc/ops/cmake/intf_pub.cmake 的 include 路径配置。由于 CANN 9.1 将 prof_api.h 从原位置迁移到 msprof/profiling/,而 prof_common.h 仍位于 msprof/toolchain/,本改动通过补齐这两个子目录,使后续走 intf_pub 的自定义算子编译时能够正确解析 msprof 头文件。该改动不新增算子源码、不启用构建、不暴露 API,对所有使用 intf_pub 的自定义算子通用,而非 eqbsa 专用逻辑。

主要改动

  • 补齐 msprof/toolchain include 目录:在 target_include_directories(intf_pub ...) 中新增 ${ASCEND_CANN_PACKAGE_PATH}/include/experiment/msprof/toolchain,用于解析仍位于该子目录下的 prof_common.h
  • 补齐 msprof/profiling include 目录:新增 ${ASCEND_CANN_PACKAGE_PATH}/include/experiment/msprof/profiling,用于解析 CANN >= 9.1 迁移后的 prof_api.h
  • 添加路径变更说明注释:在新增目录前补充注释,说明 CANN 9.1 将 prof_api.h 迁至 msprof/profiling/prof_common.h 保留在 msprof/toolchain/,并指出不存在的目录只会触发无害的 -Wmissing-include-dirs 警告。
likedislike
atomgit-bot
atomgit-bot
23 天前 评论:

代码审查

✅ 未发现问题

likedislike
ascend-robotascend-robot成员
23 天前 添加了label:ascend-cla/yes
ascend-robot
ascend-robot成员
23 天前 评论:

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


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

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

likedislike
ascend-robotascend-robot成员
23 天前 添加了label:ci-pipeline-running
Llanwangli成员
23 天前 修改了pull request 的描述
ascend-robot
ascend-robot成员
23 天前 评论:

ascend docs pipeline is running...

likedislike
ascend-robotascend-robot成员
23 天前 添加了label:docs-ci-pipeline-running
ascend-robot
ascend-robot成员
23 天前 评论:

✅ 跳过 docs ci 检查,没有需要检查的文档文件

likedislike
ascend-robotascend-robot成员
23 天前 删除了label:docs-ci-pipeline-running
ascend-robotascend-robot成员
23 天前 添加了label:docs-ci-pipeline-success
ascend-robotascend-robot成员
23 天前 删除了label:ci-pipeline-running
ascend-robotascend-robot成员
23 天前 添加了label:ci-pipeline-passed
ascend-robot
ascend-robot成员
23 天前 评论:
流水线 PR-pipeline_MindIE-SD_gitcode#1742 [ commitID:16031bd4 ] 已完成
>>>代码风格自动修复执行成功(无修复内容)
阶段 任务名 状态 详情
编译构建 Build_linux_x86_abi1 >>>
Build_linux_arm_abi1 >>>
Build_linux_arm_abi0 >>>
恶意代码检查 Antipoison >>>
开源片段检查 SCA >>>
开发者测试 UT_linux_arm >>>
流水线 PR-pipeline_MindIE-SD_gitcode >>>
此流水线已支持下列评论快捷指令,仅PR创建者和白名单成员评论有效
  • compile : 运行流水线
  • retry : 重试流水线所有失败子任务
  • retry <任务名> : 仅重试指定失败子任务
  • stop : 停止流水线
likedislike
Llanwangli成员
23 天前 修改了pull request 的描述
changetheway成员
23 天前 评论:

/lgtm

likedislike
lijinxi
lijinxi成员
23 天前 评论:

/lgtm

likedislike
lijinxi
lijinxi成员
23 天前 评论:

/approve

likedislike
ascend-robotascend-robot成员
23 天前 添加了label:lgtm
ascend-robotascend-robot成员
23 天前 添加了label:approved
blian
blian成员
23 天前 评论:

/merge

likedislike
ascend-robotascend-robot成员
23 天前 添加了label:keeper_approved
ascend-robotascend-robot成员
23 天前 合入了pull request