已合并
refactor(fia/quant_flash_attn): 移除op_kernel头文件的__has_include守卫, 统一include真实头文件路径 #11986
wangke293创建于 9月14日
refactor(fia/quant_flash_attn): 移除op_kernel头文件的__has_include守卫, 统一include真实头文件路径 #11986
已合并
Pull Request已成功合入, 合并人@CANN-robot
(感谢 wangke293 的贡献)atomgit-bot
9月14日 评论:
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_attnarch35 内核头文件的__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。


不准确?
9月14日 添加了label:cann-cla/yes
CANN-robot
9月14日 评论:
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
/approveor/lgtm- Commenting
/approveimplies 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. 👍


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设为评审人
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设为评审人
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设为审查人
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-robot
9月14日 评论:
9月14日 评论:
| 🚀 CI 流水线已启动 |
|---|
| 📋 执行详情: 点击查看流水线 |


9月14日 添加了label:ci-pipeline-running
此处折叠了11条事件消息 查看更多
9月15日 将yangziqi_007设为审查人
CANN-robot
9月15日 评论:
9月15日 评论:
| 🚀 CI 流水线已启动 |
|---|
| 📋 执行详情: 点击查看流水线 |


9月15日 删除了label:ci-pipeline-failed
此处折叠了9条事件消息 查看更多
9月15日 删除了label:ci-pipeline-passed
CANN-robot
9月15日 评论:
9月15日 评论:
CANN-robot
9月15日 评论:
9月15日 评论:
| 🚀 CI 流水线已启动 |
|---|
| 📋 执行详情: 点击查看流水线 |


9月15日 添加了label:ci-pipeline-running
9月15日 删除了label:ci-pipeline-running
9月15日 添加了label:ci-pipeline-passed
shen_weiling
9月15日 评论:
9月15日 评论:
/approve


9月15日 添加了label:approved
jiang-lirui
9月15日 评论:
9月15日 评论:
/approve
/lgtm


9月15日 添加了label:lgtm
9月15日 合入了pull request
描述
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
测试
二级冒烟
文档更新
类型标签