Closed
[Bug-Report|缺陷反馈]: conversion算子中存在多处超大函数 #4916
wangsong96Add on  2 days agoClosed at  2 days ago
wangsong96
wangsong96Collaborators
2 days ago Create

一、问题描述 (必填)

代码检查工具对 conversion、random、math 模块相关算子扫描出超大函数告警(函数 nbNC 行数 >50),
去重后共 82 个。本期先整改修改风险较小的 op_host / op_api 侧 26 个,整改后总数降至 56 个,
剩余项以 op_kernel 设备侧代码为主,涉及 pad_v3_grad_replicate、pad_v4_grad 等 100+ 行核心
计算函数,后续单独跟踪整改。

位置 数量 典型位置
op_host def/infershape 8 strided_slice_assign_v2_def.cpp、tensor_move_def.cpp、circular_pad_infershape.cpp、reshape_infershape.cpp
op_host tiling 13 reflection_pad3d_grad_tiling.cpp、diag_flat_tiling.cpp(arch22/arch35)、feeds_repeat_tiling.cpp、chunk_cat_tiling.cpp
op_api 5 aclnn_npu_format_cast.cpp、aclnn_fill_diagonal.cpp、aclnn_stack.cpp、aclnn_random.cpp、aclnn_normal.cpp

二、环境信息 (可选)

三、重现步骤 (可选)

四、预期结果 (可选)

  1. 本期整改的告警全部闭环:函数 nbNC 降至 5~42 行(≤50),通过 gitcode 代码检视与 pre-commit 门禁;
  2. 整改仅为无逻辑改动的等价重构,不引入行为变化,不影响算子功能与精度;

💡 备注(选填)

likedislike
wangsong96wangsong96Collaborators
2 days ago Added label: bug-report
wangsong96wangsong96Collaborators
2 days ago Assign wangsong96 as responsible person
CANN-robotCANN-robotCollaborators
2 days ago Close issue
CANN-robotCANN-robotCollaborators
2 days ago changed custom state from 待办的 to 已完成
CANN-robotCANN-robotCollaborators
1 day ago Added label: resolved