Pull Request已成功合入, 合并人@CANN-robot
(感谢 liyuewei 的贡献)变更摘要
本 PR 为 Bug 修复,针对 Rand/Randn 算子构图(ascir 构图)问题:将 Rand 和 Randn 算子在 kOpTypeToComputeType 映射中的计算类型由 kComputeInvalid 修正为 kComputeElewise(改为引用 Rand::Type / Randn::Type 常量),并在测试构图用例 CreateRandStoreAscGraph 中调整了 Rand 节点的构图方式。
主要改动
-
修正
Rand/Randn算子计算类型映射:在autofuse/common/ascgraph_info_complete.cpp的kOpTypeToComputeType映射中,将"Rand"与"Randn"的计算类型由kComputeInvalid改为kComputeElewise,并改用Rand::Type、Randn::Type常量作为键,使含Rand的图能够被正确识别为逐元素计算类型。 -
调整
Rand构图测试用例:在autofuse/tests/framework/share_graph/src/share_graph.cc的CreateRandStoreAscGraph中,移除Rand节点上直接设置的compute_type、type、unit属性,并在rand_op与store之间新增一个abs_op(af::ascir_op::Abs),将store.x的输入由rand_op.y改为abs_op.y,让测试通过新的构图结构验证含Rand的图。


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 |
|---|---|---|
| repo-cann/graph-autofusion | ✅ yangyongqiang0606, zhang_shengjie, niuyuhu (3/2) | ✅ yangyongqiang0606 (1/1) |
💡 Tip:
- Committer can comment
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)
CLA Signature Pass
liyuewei, thanks for your pull request. All authors of the commits have signed the CLA. 👍


compile


| 🚀 CI 流水线已启动 |
|---|
| 📋 执行详情: 点击查看流水线 |


compile


| 🚀 CI 流水线已启动 |
|---|
| 📋 执行详情: 点击查看流水线 |


compile


| 🚀 CI 流水线已启动 |
|---|
| 📋 执行详情: 点击查看流水线 |


/lgtm


/lgtm


/approve


Pull Request
描述
修复Rand构图问题。
变更类型
请选择本次引入的变更类型:
关联的Issue
如何测试
描述测试此变更的步骤和前提条件:
ascir构图方式构造含有Rand的图进行测试。
核对清单
其他信息
在此添加任何其他关于本次 PR 的说明。