已关闭
[Requirement|需求建议]: Conv3DTilingEngine::CalcMnL1LoadSize 内使用了字面量 2,需要说明含义 #5811
LiuZonggu创建于  20 天前关闭于  17 天前
LiuZonggu成员
20 天前 创建

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

Backgroud(背景信息)

conv/conv3d_v2/op_host/op_tiling/conv3d_tiling_engine.cpp 中
Conv3dTilingEngine::CalcMinL1LoadSize 的 M_Mode 分支,hoAL1min 计算使用了
未命名字面量 2:

hoAL1min = m0 / shapeInfo_.wo + 2;

Origin(信息来源)

NA

Benefit / Necessity (价值/作用)

命名的常量 + 注释明确"预留两个边界行"的语义,降低后续维护成本

Design(设计方案)

将字面量 2 替换为 constexpr 具名常量并补充注释:

// An M tile may start and end inside output rows.
// Reserve two boundary rows beyond m0 / Wo for a conservative AL1 output-height estimate.
constexpr uint64_t AL1_OUTPUT_BOUNDARY_ROWS = 2;
hoAL1min = m0 / shapeInfo_.wo + AL1_OUTPUT_BOUNDARY_ROWS;

无功能变更,计算结果不变。

likedislike
LLiuZonggu成员
20 天前 添加了label:requirement
LLiuZonggu成员
20 天前 将 LiuZonggu 设为负责人
LLiuZonggu成员
20 天前 修改标题为 “[Requirement|需求建议]: Conv3DTilingEngine::CalcMnL1LoadSize 内使用了字面量 2,需要说明含义”,原标题为“[Requirement|需求建议]: ”
LLiuZonggu成员
20 天前 关联了pull request:fix(conv3d_v2): remove magic number in CalcMinL1LoadSize
LLiuZonggu成员
20 天前 关联了pull request:fix(conv3d_v2): remove magic number in CalcMinL1LoadSize for 9.2.0
CANN-robotCANN-robot成员
17 天前 关闭了 issue
LLiuZonggu成员
17 天前 issue状态由 进行中 改变为 已完成
CANN-robotCANN-robot成员
17 天前 添加了label:resolved