Closed
[Requirement|需求建议]: foreach_acos 质量加固 #7838
wuyanAdd on  21 days agoClosed at  19 days ago
wuyan
wuyanCollaborators
21 days ago Create

Thanks for sending an requirement! Please fill in the following template to help quickly solve your problem.

Backgroud(背景信息)

foreach_acos 算子存在若干质量隐患,需系统性加固:

  1. 文档约束与实现不一致:README 输出 y 的 shape 描述有误;"输出不支持非连续 Tensor"约束过时;aclnnForeachAcos.md 错误码表格不完整。
  2. Tiling 检查存在溢出风险:tensorNum 的 int32 溢出、totalElements 累加与舍入算术的 int64 溢出未防护。
  3. 缺跨实例 Tensor dtype 一致性校验(原实现仅取首 tensor dtype)。
  4. Kernel 沿用旧分区方式,边界判断存在缺陷,需统一到 foreach tiling 框架。
  5. 缺三方 Golden 参考实现。
  6. UT 精度判据与数据生成需修复。

Origin(信息来源)

CANN 算子质量加固专项(foreach 系列长尾算子)。

Benefit / Necessity (价值/作用)

消除 tiling 溢出与 dtype 校验缺失隐患,修正文档与实现不一致,补齐 Golden 与测试资产,提升 foreach_acos 算子的健壮性、正确性与可维护性。

Design(设计方案)

  1. 文档约束修正(README、aclnnForeachAcos.md 错误码表格)。
  2. Tiling 检查加固(uint64 比较、int64 溢出防护、dtype 一致性校验)。
  3. Kernel 分区重构(core 区间与 tensor 区间交集切分)。
  4. 新增基于 torch._foreach_acos 的三方 Golden。
  5. UT 精度修复 + ST 用例补充。

关联 PR:https://gitcode.com/cann/ops-nn/pull/12980

likedislike
wuyanwuyanCollaborators
21 days ago Added label: requirement
yuning_chenyuning_chenCollaborators
21 days ago Assign rrely11 as responsible person
CANN-robotCANN-robotCollaborators
19 days ago Close issue
CANN-robotCANN-robotCollaborators
19 days ago Added label: resolved