已合并
CompressorGrad资料整改 #9947
莫允扬创建于 13 天前
CompressorGrad资料整改 #9947
已合并
Pull Request已成功合入, 合并人@CANN-robot
(感谢 莫允扬 的贡献)atomgit-bot
13 天前 评论:
13 天前 评论:
变更摘要
本 PR 为 CompressorGrad 算子补充 aclnn 调用示例及相关资料整改。核心变更是新增了一个完整的 aclnnCompressorGrad 算子调用示例文件,覆盖 C4A 场景(D=512, coff=2, cmp_ratio=4, BSH layout, BF16)下的端到端使用流程,包括设备初始化、张量创建、workspace 申请、算子执行、结果回读与资源释放等完整步骤。
主要改动
- 新增
test_aclnn_compressor_grad.cpp示例文件:在attention/compressor_grad/examples/目录下新增 aclnn 调用示例,演示了aclnnCompressorGradGetWorkspaceSize和aclnnCompressorGrad接口的完整调用方式,涵盖 7 个输入张量(x、wkv、wgate、dCmpKv、softmaxScore、kv、startPos)与 4 个输出张量(dX、dWkv、dWgate、dApe)的创建与结果校验。 - 多数据类型混合使用示例:示例中展示了 BF16(
bfloat16)、FLOAT(float_t)和 INT32 三种数据类型在同一算子调用中的混合使用方式,输入x/wkv/wgate/dCmpKv及输出dX/dWkv/dWgate使用 BF16,softmaxScore/kv/dApe使用 FLOAT,startPos使用 INT32。 - 完整的资源生命周期管理示例:示例中规范展示了
aclCreateTensor→ 算子执行 →aclDestroyTensor→aclrtFree→ 流/上下文销毁 →aclFinalize的完整资源释放流程,为开发者提供了标准化的参考模板。


13 天前 添加了label:stat/needs-squash
13 天前 添加了label:cann-cla/yes
CANN-robot
13 天前 评论:
13 天前 评论:
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 |
|---|---|---|
| */*/README.md | ✅ 马兵, 蒋礼锐, 陈娇 (3/2) | ✅ 陈娇 (1/1) |
| */*/docs/acl*.md | ✅ 陈娇, 马兵, 蒋礼锐 (3/2) | ✅ 陈娇 (1/1) |
| attention | ✅ 蒋礼锐, shasha_an, 马兵 (3/2) | ✅ shasha_an, 马兵, 蒋礼锐 (3/1) |
| docs | ✅ 马兵, 蒋礼锐 (2/2) | ✅ 马兵, 蒋礼锐 (2/1) |
| sig-ops-transformer | ✅ 马兵, 蒋礼锐 (2/2) | ✅ 蒋礼锐, 马兵 (2/1) |
💡 Tip:
- Committer can comment
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)
CLA Signature Pass
myy268, thanks for your pull request. All authors of the commits have signed the CLA. 👍


此处折叠了177条消息 查看更多
11 天前 添加了label:approved
jiang-lirui
11 天前 评论:
11 天前 评论:
/approve
/lgtm


11 天前 添加了label:lgtm
11 天前 合入了pull request
描述
CompressorGrad资料、pytest整改,torch接口修复bug
关联的Issue
测试
文档更新
类型标签