已合并
refactor(fia/quant_flash_attn): 移除op_kernel头文件的__has_include守卫, 统一include真实头文件路径 #11986
refactor(fia/quant_flash_attn): 移除op_kernel头文件的__has_include守卫, 统一include真实头文件路径 #11986
已合并
wangke293创建于 9月14日
wangke293成员
9月14日

描述

refactor(fia/quant_flash_attn): 移除op_kernel头文件的__has_include守卫, 统一include真实头文件路径

关联的Issue

https://gitcode.com/cann/ops-transformer/issues/4950
https://gitcode.com/cann/ops-transformer/issues/5255

测试

二级冒烟

文档更新

类型标签

likedislike
Pull Request已成功合入, 合并人@CANN-robot
(感谢 wangke293 的贡献)
Wwangke293成员
9月14日 创建了 pull request,commit 5b1fefb3
Wwangke293成员
9月14日 关联了issue:fused_infer_attention_score的全量化和quant_flash_attn文件文件中存在使用__has_include,需整改
atomgit-bot
atomgit-bot
9月14日 评论:

变更摘要

该 PR 对 attention/fused_infer_attention_score(FIA)与 attention/quant_flash_attn 两个模块的 op_kernel 头文件进行纯重构:移除所有 #if __has_include(...) 条件编译守卫及其 #else 分支中的备用 include 路径,统一保留对真实头文件路径(../../../common/op_kernel/...)的直接 #include。改动仅涉及头文件包含方式的清理,不包含任何业务逻辑调整,共删除 145 行、新增 0 行。

主要改动

  • 移除 FIA arch35 内核头文件的 __has_include 守卫:在 fia_arch35_zero_output.h、fia_block_cube_fullquant_gqa.h、fia_block_cube_fullquant_mla.h、fia_block_cube_fullquant_mx.h、fia_block_vec_flashdecode_fullquant.h、fia_block_vec_fullquant_gqa.h、fia_block_vec_fullquant_mla.h、fia_block_vec_fullquant_mx.h 中删除 __has_include 判断及其 #else 备用路径,仅保留指向 common/op_kernel 真实目录的 include。
  • 移除 quant_flash_attn arch35 内核头文件的 __has_include 守卫:在 quant_flash_attn_block_cube_hif8.h、quant_flash_attn_block_cube_mxfp8.h、quant_flash_attn_block_vec_flashdecode.h、quant_flash_attn_block_vec_hif8.h、quant_flash_attn_block_vec_mxfp8.h、quant_flash_attn_kernel_hif8.h、quant_flash_attn_kernel_mxfp8.h 中删除条件编译分支,统一保留 ../../../common/op_kernel/... 真实路径的 include。
  • 清理入口文件的备用 include 分支:在 fused_infer_attention_score.cpp 与 quant_flash_attn.cpp 中,删除 NOT_DYNAMIC_COMPILE/__has_include 分支下的 ../ 备用路径,仅保留指向 op_kernel 真实目录的头文件 include。
likedislike
不准确?
CANN-robotCANN-robot成员
9月14日 添加了label:cann-cla/yes
CANN-robot
CANN-robot成员
9月14日 评论:

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.
For more, you also can visit HICANN.


PR Approval Progress

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

Module Approval Details

module lgtm status approve status
attention ✅ shen_weiling, 蒋礼锐 (2/2) ✅ shen_weiling, 蒋礼锐 (2/1)

💡 Tip:

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

CLA Signature Pass

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

likedislike
CANN-robotCANN-robot成员
9月14日 将guijianwei,hz36amy_00,coder_linx,juyangokok,monologue815,xuanyuandy,crystalhu,yu-xinjie62,huangwei791,jiang-lirui,yang-binrong,Allan_Yu,liudan12,shasha_an,wangzhe123456789,Wei_NaChuan,zhangshuoleiokok,luwei_1104,cc-z,kdy18482276080,shen_weiling,gaoxiang618,songjionghui,wenxin_fight,miaofangzheng,mabing1118,tang-hao-hw-gitcode,haijie_699874,zzy__,Julius47,yuhao_,L_Euler,wangxun21设为评审人
CANN-robotCANN-robot成员
9月14日 将guijianwei,hz36amy_00,coder_linx,juyangokok,monologue815,xuanyuandy,crystalhu,yu-xinjie62,huangwei791,jiang-lirui,yang-binrong,Allan_Yu,liudan12,shasha_an,wangzhe123456789,Wei_NaChuan,zhangshuoleiokok,luwei_1104,cc-z,kdy18482276080,shen_weiling,gaoxiang618,songjionghui,wenxin_fight,miaofangzheng,mabing1118,tang-hao-hw-gitcode,haijie_699874,zzy__,Julius47,yuhao_,L_Euler,wangxun21设为审查人
wangke293成员
9月14日 评论:

compile

likedislike
Wwangke293成员
9月14日 预合并成功(commit_id: b3792590be98544d9081c640031fe6ca254c2f2b)
CANN-robot
CANN-robot成员
9月14日 评论:
🚀 CI 流水线已启动
📋 执行详情: 点击查看流水线
likedislike
CANN-robotCANN-robot成员
9月14日 添加了label:ci-pipeline-running
此处折叠了11条事件消息 查看更多
CANN-robotCANN-robot成员
9月15日 将yangziqi_007设为审查人
wangke293成员
9月15日 评论:

compile

likedislike
Wwangke293成员
9月15日 预合并成功(commit_id: 6133cb576c97d1f71ce171b2252c087c877b1dcf)
CANN-robot
CANN-robot成员
9月15日 评论:
🚀 CI 流水线已启动
📋 执行详情: 点击查看流水线
likedislike
CANN-robotCANN-robot成员
9月15日 删除了label:ci-pipeline-failed
此处折叠了9条事件消息 查看更多
CANN-robotCANN-robot成员
9月15日 删除了label:ci-pipeline-passed
CANN-robot
CANN-robot成员
9月15日 评论:

Notification

This pull request has been changed(code update) or closed, so removes the following label(s): ci-pipeline-passed.

likedislike
wangke293成员
9月15日 评论:

compile

likedislike
Wwangke293成员
9月15日 预合并成功(commit_id: b2b5b0ea1c07e1b5440b6cedafaacff8423a982f)
CANN-robot
CANN-robot成员
9月15日 评论:
🚀 CI 流水线已启动
📋 执行详情: 点击查看流水线
likedislike
CANN-robotCANN-robot成员
9月15日 添加了label:ci-pipeline-running
CANN-robotCANN-robot成员
9月15日 删除了label:ci-pipeline-running
CANN-robotCANN-robot成员
9月15日 添加了label:ci-pipeline-passed
shen_weiling
shen_weiling成员
9月15日 评论:

/approve

likedislike
CANN-robotCANN-robot成员
9月15日 添加了label:approved
jiang-lirui成员
9月15日 评论:

/approve
/lgtm

likedislike
CANN-robotCANN-robot成员
9月15日 添加了label:lgtm
CANN-robotCANN-robot成员
9月15日 合入了pull request
Wwangke293成员
9月24日 修改了pull request 的描述