已关闭
[Bug-Report|缺陷反馈]: Index算子UT覆盖率不足,非连续场景无UT覆盖 #6038
xuejinghui创建于 14 天前关闭于 14 天前
14 天前 添加了label:bug-report
14 天前 修改标题为 “[Bug-Report|缺陷反馈]: Index算子UT覆盖率不足,非连续场景无UT覆盖”,原标题为“[Bug-Report|缺陷反馈]: 1”
14 天前 修改了issue 的描述
xuejinghui
14 天前 评论:
14 天前 评论:
/assign


14 天前 将 xuejinghui 设为负责人
14 天前 关闭了 issue
14 天前 添加了label:resolved
[Bug-Report|缺陷反馈]: Index算子UT覆盖率不足,非连续场景无UT覆盖
Describe the current behavior / 问题描述
ops-nn master 分支(commit 547935d4f)index/index 算子的 op_host tiling UT 覆盖率不足,
实测(lcov,
bash build.sh --ophost -u --cov --ops=index --soc=ascend950):问题根因:现有 7 个 tiling 用例全部通过 TilingContextFaker 的 InputShapes 构造 V1 Tensor,
gert::TilingContext::InputIsView() 恒返回 false,导致 IndexNonContinuousTiling::IsCapable()
永远不成立,非连续场景(x/indices 为视图携带非连续 stride)从未被真正执行。
IsCapable 之后的视图 stride 处理、CoalesceIndex、SetTilingData、GetTilingKey、PostTiling
等核心逻辑全部未被覆盖。
同时其他模板也存在覆盖空洞:
无效 mask 回落分支未覆盖
Environment Information / 环境信息
Steps to reproduce the issue / 重现步骤
或 HTML 报告 build/tests/ut/cov_report/cpp_utest/index.html
另外 arch35 目录用例仅在 --soc=ascend950/ascend350 时参与编译,
默认 ascend910b 构建下这些用例不会被编译执行
Describe the expected behavior / 预期结果
非连续 stride 的输入 tensor(仓库内 batch_mat_mul_v3 已有先例),
使 InputIsView() 返回 true,真正执行 IndexNonContinuousTiling 模板
等场景补齐用例
Related log / screenshot / 日志 / 截图
改动前覆盖率实测数据(lcov):
Special notes for this issue / 备注