Closed
[Bug-Report|缺陷反馈]: ForeachBinaryOp 图内部算子被自动生成 aclnn 接口 #8852
严明奎Add on  6 days agoClosed at  6 days ago
严明奎
严明奎Collaborators
6 days ago Create

Describe the current behavior / 问题描述

ForeachBinaryOp 是仅在 Ascend 950(arch35)实现的图内部融合算子,无 op_host/op_api 手写接口,README 仅提供图模式调用说明,GEIR 样例也标注 no aclnn entry。

但 foreach/foreach_binary_op/op_host/CMakeLists.txt 中 ACLNNTYPE 为 aclnn,opbuild 会以 OPS_ACLNN_GEN=1 从 opdef 自动生成 aclnn_foreach_binary_op 接口并加入 aclnn_ops_nn.h 汇总头,导致本不应存在的 aclnn 入口被生成。

Environment Information / 环境信息

构建期问题,与具体加速卡无关:在构建 ascend950(arch35)版本时可见。

Steps to reproduce the issue / 重现步骤

  1. 使用改动前的 foreach/foreach_binary_op/op_host/CMakeLists.txt(ACLNNTYPE aclnn)构建;
  2. 查看 opbuild 产物 ASCEND_AUTOGEN_PATH/aclnn/;
  3. 可见自动生成的 aclnn_foreach_binary_op.h/.cpp,且 aclnn_ops_nn.h 汇总头包含该接口。

Describe the expected behavior / 预期结果

图内部算子不生成 aclnn 接口:opdef 仍参与 GE 图注册,但不产生 aclnn_foreach_binary_op 产物与汇总头条目。

无(构建产物差异,非运行时错误)。

Special notes for this issue/备注

关联 PR:https://gitcode.com/cann/ops-nn/merge_requests/14451
修复方式:ACLNNTYPE 由 aclnn 改为 aclnn_exclude,opbuild 以 OPS_ACLNN_GEN=0 处理。

likedislike
严明奎严明奎Collaborators
6 days ago Added label: bug-report
CANN-robotCANN-robotCollaborators
6 days ago Close issue
CANN-robotCANN-robotCollaborators
6 days ago changed custom state from 待办的 to 已完成
CANN-robotCANN-robotCollaborators
6 days ago Added label: resolved