已合并
test: 补充ascir_common与ascir_att_impl单元测试(#210) #1985
Leechi666创建于 11 天前
test: 补充ascir_common与ascir_att_impl单元测试(#210) #1985
已合并
Pull Request已成功合入, 合并人@CANN-robot
(感谢 Leechi666 的贡献)11 天前 关联了issue:【代码加固】补充autofuse/ascir/目录下单元测试
atomgit-bot
11 天前 评论:
11 天前 评论:
变更摘要
本 PR 为 Issue #210(generator 目录)首批单元测试补充,聚焦 autofuse/ascir/generator 目录:新增 AscirCommonTest(4 个用例)与 AscIrAttImplTest(3 组共 26 类断言)两个测试文件,分别将 ascir_common.cpp 的行覆盖率从 85.7% 提升至 100%,并对 v1_ascir_att_impl.h 中各 XAscIrAttImpl 宏生成类做契约级断言;同时在 test_ascir_ut 的 CMakeLists 中接线新增测试文件与 ${CODE_ROOT_DIR}/ascir/generator include 路径。
主要改动
- 新增
test_ascir_common.cpp(4 个用例):通过AscirCommonTest覆盖GetConversionFromDtypeMap输入/输出 dtype 命中映射表并正确替换(如DT_FLOAT→DT_BF16、DT_INT32→DT_FLOAT16)的分支,以及IsAllVecAxisContinuous输入/输出两侧双向量化轴连续判断的三个分支(两侧均连续返回 true、输出侧非连续返回 false、输入侧非连续返回 false)。 - 新增
test_ascir_att_impl.cpp(26 类断言):通过AscIrAttImplTest与EXPECT_ATT_IMPL_NAMED宏,对 Add/Gather/Abs 等逐元素类、ReduceArgMax 系列及 Data/Scalar/MatMul 等无建模类共 26 个XAscIrAttImpl实例断言GetApiPerf()与GetAscendCApiPerfTable()均返回其自身 IR 名,防止算子改名或宏重构引入回归。 - CMakeLists 接线调整:
test_ascir_ut新增上述 2 个测试文件编译目标,并加入${CODE_ROOT_DIR}/ascir/generatorinclude 路径(依据 PR 描述,无内嵌补丁)。


不准确?
atomgit-bot
11 天前 评论:
11 天前 评论:
11 天前 添加了label:cann-cla/yes
CANN-robot
11 天前 评论:
11 天前 评论:
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, liyuewei (3/2) | ✅ yangyongqiang0606 (1/1) |
💡 Tip:
- Committer can comment
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)


CANN-robot
11 天前 评论:
11 天前 评论:
11 天前 将niuyuhu,yangyongqiang0606,liyuewei,xchu42,zhang_shengjie,depeng1994,wqtshg_wt,peiyang,shengnan666,XuebinYang,sjtulxh,zhanj,zhujingjing,xuyafei,wangxiaotian995设为评审人
11 天前 将niuyuhu,yangyongqiang0606,liyuewei,xchu42,zhang_shengjie,depeng1994,wqtshg_wt,peiyang,shengnan666,XuebinYang,sjtulxh,zhanj,zhujingjing,xuyafei,wangxiaotian995设为评审人
11 天前 将niuyuhu,yangyongqiang0606,liyuewei,xchu42,zhang_shengjie,depeng1994,wqtshg_wt,peiyang,shengnan666,XuebinYang,sjtulxh,zhanj,zhujingjing,xuyafei,wangxiaotian995设为审查人
11 天前 将niuyuhu,yangyongqiang0606,liyuewei,xchu42,zhang_shengjie,depeng1994,wqtshg_wt,peiyang,shengnan666,XuebinYang,sjtulxh,zhanj,zhujingjing,xuyafei,wangxiaotian995设为审查人
Leechi666
11 天前 评论:
11 天前 评论:
compile


11 天前 预合并成功(commit_id: 75375a5a64e1a825c908b675461aa8df561ac18a)
CANN-robot
11 天前 评论:
11 天前 评论:
| 🚀 CI 流水线已启动 |
|---|
| 📋 执行详情: 点击查看流水线 |


11 天前 添加了label:ci-pipeline-running
11 天前 删除了label:ci-pipeline-running
11 天前 添加了label:ci-pipeline-passed
11 天前 修改了pull request 的描述
11 天前 修改了pull request 的描述
zhang_shengjie
11 天前 评论:
11 天前 评论:
/lgtm


liyuewei
11 天前 评论:
11 天前 评论:
/lgtm


11 天前 添加了label:lgtm
yangyongqiang
10 天前 评论:
10 天前 评论:
/approve


10 天前 添加了label:approved
10 天前 合入了pull request
Pull Request
描述
补充 autofuse/ascir/generator 目录的单元测试(Issue #210 generator 部分第一批提交):
变更含 CMakeLists 接线:test_ascir_ut 新增 2 个测试文件与 ${CODE_ROOT_DIR}/ascir/generator include 路径。
变更类型
关联的Issue
#210
如何测试
sh build.sh -u --module=autofuse_framework -j 8AscirCommonTest(4 用例)与AscIrAttImplTest(3 组共 26 类断言)全部通过核对清单
其他信息
与 PR #1953(reg_func 部分)同属 Issue #210 的分批交付,本 PR 为 generator 目录首批。