Merged
【Feature】新增aclnn_mla_prolog_v4_weightNz接口,用于使能算子中的RoPE计算操作 #10296
zhengyuhao3Add on Aug 19
【Feature】新增aclnn_mla_prolog_v4_weightNz接口,用于使能算子中的RoPE计算操作 #10296
Merged
Pull Request has been successfully merged by CANN-robot.
(Thank you for zhengyuhao3's contribution.)Aug 19 Created pull request, commit 2af5061a
atomgit-bot
Aug 19 Comments:
Aug 19 Comments:
变更摘要
本 PR 主要修复 RTY 编译模式下不会编译 inner 接口 v 版本、导致链接期出现 undefined interface 的问题,同时重新上库此前临时下架的 aclnn_mla_prolog_v4_weight_nz 接口(含头文件、实现及配套调用示例)。
主要改动
- 修复 RTY 编译模式漏编 v 版本接口(
cmake/rty_obj_func.cmake):当MODULE_ACLNN_EXTRA_VERSION配置了多个版本时限制只允许一个OpType,并通过concat_op_names将ACLNN_EXTRA_VERSION并入编译产物名,确保 v 版本 inner 接口在 RTY 模式下被编译,解决 undefined interface。 - 重新上库
aclnn_mla_prolog_v4_weight_nz接口:新增aclnn_mla_prolog_v4_weight_nz.h/.cpp,实现aclnnMlaPrologV4WeightNzGetWorkspaceSize与aclnnMlaPrologV4WeightNz;对weightQuantMode/kvCacheQuantMode/queryQuantMode做平台相关合法性校验(DAV_3510下支持更多量化模式),并通过TensorHolder处理doRope关闭时ropeSin/ropeCos的空 tensor 填充,最终转发至 inner 接口aclnnInnerMlaPrologV3V1GetWorkspaceSize与aclnnInnerMlaPrologV3V1。 - 注册接口编译清单:在
cmake/level2_ops_list中新增aclnn_mla_prolog_v4_weight_nz.h,使该接口进入编译清单。 - 新增三类调用示例:
test_aclnn_mla_prolog_v4.cpp(BF16 非量化、PA_BSND)、examples/arch35/test_aclnn_mla_prolog_v4_fqkvq.cpp(FP8 全量化、含dequantScale/quantScale等反量化入参)、test_aclnn_mla_prolog_v4_pq_pc.cpp(部分量化 per-channel、PA_BLK_BSND、BS 合轴及queryNormOut输出),覆盖不同量化模式与 cache 模式下的接口调用流程。


Incorrect?
Aug 19 Added label: cann-cla/yes
CANN-robot
Aug 19 Comments:
Aug 19 Comments:
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.
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 |
|---|---|---|
| */*/README.md | ✅ 蔡雯雯, 吴瑶, 黄俊健 (3/2) | ✅ 蔡雯雯, 吴瑶 (2/1) |
| */*/docs/acl*.md | ✅ 吴瑶, 蔡雯雯, 黄俊健 (3/2) | ✅ 吴瑶, 蔡雯雯 (2/1) |
| */*/op_api/aclnn*.h | ✅ 王永光, 黄俊健 (2/2) | ✅ 王永光 (1/1) |
| attention | ✅ 於欣洁, 黄俊健 (2/2) | ✅ 於欣洁 (1/1) |
| cmake | ✅ wang-minbo, 黄俊健 (2/2) | ✅ wang-minbo (1/1) |
| docs | ✅ 於欣洁, wang-minbo, 黄俊健 (3/2) | ✅ 於欣洁, wang-minbo (2/1) |
💡 Tip:
- Committer can comment
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)
CLA Signature Pass
zhengyuhao3, thanks for your pull request. All authors of the commits have signed the CLA. 👍


Aug 19 Set guijianwei,hz36amy_00,coder_linx,juyangokok,monologue815,xuanyuandy,crystalhu,yu-xinjie62,huangwei791,jiang-lirui,yang-binrong,Allan_Yu,wang-minbo,tang-lei01,xtqh,liudan12,shasha_an,wangzhe123456789,cc-z,shen_weiling,gaoxiang618,songjionghui,wenxin_fight,miaofangzheng,mabing1118,tang-hao-hw-gitcode,wangyongguang,haijie_699874,zzy__,yuhao_,L_Euler as approver
Aug 19 Set guijianwei,hz36amy_00,coder_linx,juyangokok,monologue815,xuanyuandy,crystalhu,yu-xinjie62,huangwei791,jiang-lirui,yang-binrong,Allan_Yu,wang-minbo,tang-lei01,xtqh,liudan12,shasha_an,wangzhe123456789,cc-z,shen_weiling,gaoxiang618,songjionghui,wenxin_fight,miaofangzheng,mabing1118,tang-hao-hw-gitcode,wangyongguang,haijie_699874,zzy__,yuhao_,L_Euler as approver
48 messages are collapsed here。 See more
CANN-robot
Aug 20 Comments:
Aug 20 Comments:
The following users do not have permission to comment /lgtm or /approve on any module in this PR:
唐超


wangyongguang
Aug 20 Comments:
Aug 20 Comments:
/approve


CANN-robot
Aug 20 Comments:
Aug 20 Comments:
The following users do not have permission to comment /lgtm or /approve on any module in this PR:
唐超


Aug 20 Added label: lgtmapproved
Aug 20 Merged pull request
描述
kimi-k3模型需求特性,新增aclnn_mla_prolog_v4_weightNz接口,较V3接口新增doRope参数,用于开关算子中的RoPE计算操作
关联的Issue
测试
RDV测试不影响现有mla_prolog_v3功能
atk精度泛化测试用例通过 300/300
文档更新
新增了aclnnMlaPrologV4WeightNz.md文件
类型标签