已合并
【fix】: 修复Rand构图问题 #1964
【fix】: 修复Rand构图问题 #1964
已合并
liyuewei创建于 9月4日
liyuewei
liyuewei成员
9月4日

Pull Request

描述

修复Rand构图问题。

变更类型

请选择本次引入的变更类型:

关联的Issue

如何测试

描述测试此变更的步骤和前提条件:
ascir构图方式构造含有Rand的图进行测试。

核对清单

其他信息

在此添加任何其他关于本次 PR 的说明。

likedislike
Pull Request已成功合入, 合并人@CANN-robot
(感谢 liyuewei 的贡献)
liyueweiliyuewei成员
9月4日 添加了label:enhancement
liyueweiliyuewei成员
9月4日 创建了 pull request,commit 2227cebd
atomgit-bot
atomgit-bot
9月4日 评论:

变更摘要

本 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 的图。

likedislike
不准确?
atomgit-bot
atomgit-bot
9月4日 评论:

代码审查

✅ 未发现问题

likedislike
不准确?
CANN-robotCANN-robot成员
9月4日 添加了label:cann-cla/yes
CANN-robot
CANN-robot成员
9月4日 评论:

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 /approve or /lgtm
  • Commenting /approve implies 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. 👍

likedislike
CANN-robot
CANN-robot成员
9月4日 评论:

CLA Signature Pass

liyuewei, thanks for your pull request. All authors of the commits have signed the CLA. 👍

likedislike
CANN-robotCANN-robot成员
9月4日 将niuyuhu,yangyongqiang0606,xchu42,zhang_shengjie,depeng1994,wqtshg_wt,peiyang,shengnan666,XuebinYang,sjtulxh,zhanj,zhujingjing,xuyafei,wangxiaotian995设为评审人
CANN-robotCANN-robot成员
9月4日 将niuyuhu,yangyongqiang0606,xchu42,zhang_shengjie,depeng1994,wqtshg_wt,peiyang,shengnan666,XuebinYang,sjtulxh,zhanj,zhujingjing,xuyafei,wangxiaotian995设为审查人
liyuewei
liyuewei成员
9月4日 评论:

compile

likedislike
liyueweiliyuewei成员
9月4日 预合并成功(commit_id: 325dbdd8453a046dc87c08454b8ef2cbee025364)
CANN-robot
CANN-robot成员
9月4日 评论:
🚀 CI 流水线已启动
📋 执行详情: 点击查看流水线
likedislike
CANN-robotCANN-robot成员
9月4日 添加了label:ci-pipeline-running
此处折叠了6条事件消息 查看更多
CANN-robotCANN-robot成员
9月4日 添加了label:cann-cla/yes
liyuewei
liyuewei成员
9月4日 评论:

compile

likedislike
liyueweiliyuewei成员
9月4日 预合并成功(commit_id: 3f4bc8426dc1fea7dc6eba5483eb5c98f2b03a77)
CANN-robot
CANN-robot成员
9月4日 评论:
🚀 CI 流水线已启动
📋 执行详情: 点击查看流水线
likedislike
CANN-robotCANN-robot成员
9月4日 删除了label:ci-pipeline-failed
此处折叠了7条事件消息 查看更多
CANN-robotCANN-robot成员
9月4日 添加了label:cann-cla/yes
liyuewei
liyuewei成员
9月5日 评论:

compile

likedislike
liyueweiliyuewei成员
9月5日 预合并成功(commit_id: b3e5174f72df585792ff6f0cc89b136e8b8ac0d7)
CANN-robot
CANN-robot成员
9月5日 评论:
🚀 CI 流水线已启动
📋 执行详情: 点击查看流水线
likedislike
CANN-robotCANN-robot成员
9月5日 删除了label:ci-pipeline-failed
CANN-robotCANN-robot成员
9月5日 添加了label:ci-pipeline-running
CANN-robotCANN-robot成员
9月5日 删除了label:ci-pipeline-running
CANN-robotCANN-robot成员
9月5日 添加了label:ci-pipeline-passed
zhang_shengjie成员
9月5日 评论:

/lgtm

likedislike
牛玉虎
牛玉虎成员
9月5日 评论:

/lgtm

likedislike
CANN-robotCANN-robot成员
9月5日 添加了label:lgtm
yangyongqiang
yangyongqiang成员
9月5日 评论:

/approve

likedislike
CANN-robotCANN-robot成员
9月5日 添加了label:approved
CANN-robotCANN-robot成员
9月5日 合入了pull request