Closed
[Bug-Report|缺陷反馈]: quant_flash_attn兼容性支持 #6423
yangxh1203Add on  25 days agoClosed at  25 days ago
yangxh1203
yangxh1203Collaborators
25 days ago Create

Describe the current behavior / 问题描述 (Mandatory / 必填)

使用9.1.0cann包编译最新代码报错

Environment Information / 环境信息 (Mandatory / 必填)

Ascend 950
cann 9.1.0
ops-transformer/master

Steps to reproduce the issue / 重现步骤 (Mandatory / 必填)

使用9.1.0cann包编译最新ops-transformer/master

Describe the expected behavior / 预期结果 (Mandatory / 必填)

编译成功

Dtype of q of op QuantFlashAttn is not support.
make[3]: *** [CMakeFiles/opbuild_gen_inner.dir/build.make:75: /home/y00938753/ops-transformer/build/autogen/inner/aclnnInner_quant_flash_attn.cpp] Error 1
make[3]: *** Deleting file '/home/y00938753/ops-transformer/build/autogen/inner/aclnnInner_quant_flash_attn.cpp'
make[2]: *** [CMakeFiles/Makefile2:933: CMakeFiles/opbuild_gen_inner.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:1260: CMakeFiles/prepare_build.dir/rule] Error 2
make: *** [Makefile:560: prepare_build] Error 2
CMake Error at cmake/config.cmake:263 (message):
Error: ops prepare build failed.
Call Stack (most recent call first):

Special notes for this issue/备注 (Optional / 选填)

likedislike
yangxh1203yangxh1203Collaborators
25 days ago Added label: bug-report
游震Collaborators
25 days ago Comments:

/assign @yangxh1203

likedislike
CANN-robotCANN-robotCollaborators
25 days ago Assign yangxh1203 as responsible person
周云飞
周云飞Collaborators
25 days ago Comments:

/assign @yangxh1203

likedislike
周云飞
周云飞Collaborators
25 days ago Comments:

您好,感谢反馈!从您提供的日志看,在 Ascend 950、CANN 9.1.0 环境下,构建在生成 QuantFlashAttn 的内部接口代码时失败,直接报错是生成工具不支持算子 q 参数声明的数据类型。后续的 make 和 CMake 报错是该步骤失败后的结果,并非算子运行时错误。

目前还不能仅凭这条日志确定具体是哪种数据类型不受支持,也不能直接认定 CANN 9.1.0 不支持该算子。一个需要确认的方向是:您使用的源码中 QuantFlashAttn 的类型声明,与当前 CANN 包中接口生成工具支持的类型是否匹配。若确认为版本兼容问题,可考虑使用经确认匹配的源码与 CANN 版本组合,或在算子定义及接口生成环节增加兼容处理;不宜仅删除类型声明来绕过报错,以免影响接口与实际计算实现的一致性。

请补充本次编译所用的源码提交号、完整编译命令,以及首次出现该类型错误前的相关日志,便于确定构建选项、实际调用的生成工具和具体不兼容项。您已提供硬件型号和 CANN 版本,无需重复补充;日志中的个人路径等信息可先脱敏。

likedislike
CANN-robotCANN-robotCollaborators
25 days ago Close issue
CANN-robotCANN-robotCollaborators
25 days ago Added label: resolved
周云飞
周云飞Collaborators
4 days ago Comments:

已合入相关改动:

  • PR !14093 将 quant_flash_attn 部分数据类型检查中的 GE 类型常量替换为算子仓自定义类型常量,并增加兼容旧编译器的宏。
  • PR !14379 为 UT 编译添加算子仓头文件搜索路径,修复编译时找不到相关头文件的问题。

关联 PR:PR #14093、PR #14379

likedislike