Pull Request已成功合入, 合并人@CANN-robot
(感谢 onanfield 的贡献)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 |
|---|---|---|
| */*/op_graph/*_proto.h | ✅ tang-lei01, wangrui_ (2/2) | ✅ tang-lei01 (1/1) |
💡 Tip:
- Committer can comment
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)


🔵 source code change are detected, tasks labels is removed in this pull request!


问题/功能描述
本次PR旨在更新MatrixSetDiag算子的接口文档,以解决原有文档中对输入张量diagonal的维度、形状及支持的数据类型描述不够清晰和完整的问题。通过更精确地描述输入张量的维度约束和数据类型支持范围,提升了算子使用的准确性和兼容性。
修改方案描述
修改了算子注册头文件中的注释文档,具体包括:1)明确了输入张量x的维度范围为2到8维,并扩展了其支持的数据类型列表,新增了bfloat16和bool类型;2)详细规定了输入张量diagonal的维度范围(比x少一维)及其形状规则,明确指出其最后一维是x最后两维中较小的那个,其余维度与x相同;3)更新了输出张量y的描述,明确其与输入x具有相同的类型和形状。这些修改使算子接口的定义更加严谨,与底层实现保持一致。


流水线任务触发成功
任务链接 [86dd3a253fc545f0973740935423a7a7][流水线指导]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| codecheck | ✅ SUCCESS | >>>>> | |
| SCA | ✅ SUCCESS | >>>>> | |
| anti_virus | ✅ SUCCESS | >>>>> | |
| Check_Pr | ✅ SUCCESS | >>>>> | |
| Compile_Ascend_X86 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_X86_mobile_station | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_ARM | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_X86_experimental | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_ARM_experimental | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_single | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_X86_A5 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_ARM_A5 | ✅ SUCCESS | >>>>> | >>>>> |
| API_Check | ✅ SUCCESS | >>>>> | |
| pre_comment | ✅ SUCCESS | >>>>> | |
| Compile_Ascend_X86_ubuntu24 | ✅ SUCCESS | >>>>> | |
| Compile_Ascend_X86_mobile_station_ubuntu24 | ✅ SUCCESS | >>>>> | |
| Compile_Ascend_X86_experimental_ubuntu24 | ✅ SUCCESS | >>>>> | |
| Compile_Ascend_X86_A5_ubuntu24 | ✅ SUCCESS | >>>>> | |
| UT_Test | ✅ SUCCESS | ||
| UT_Test_experimental | ✅ SUCCESS | ||
| UT_Test_kernel | ✅ SUCCESS | ||
| Smoke_A900_npupool | ✅ SUCCESS | >>>>> | |
| harmony-infer | ✅ SUCCESS |
[2026-03-05 19:59:08] CI执行结束


/approve
/lgtm


Review Guide
This pull-request passes review.
Committers who wrote a comment of /approve are: tang-lei01.
Reviewers who wrote a comment of /lgtm are: tang-lei01, wangrui_.


描述
MatrixSetDiag修改proto描述
关联的Issue
https://gitcode.com/cann/ops-math/issues/884
测试
文档更新
类型标签