已关闭
[confusion_matrix] 转测验证发现:输入校验缺口与 golden 实现问题(修复见关联 PR) #3578
shengle创建于 18 天前关闭于 18 天前
shengle
18 天前 评论:
18 天前 评论:
修复 PR:#6337(feat/confusion-matrix 分支,含 UT 20/20、ST 真机 12/12、GEIR 55/55 回归验证)


18 天前 将 SeanDictionary 设为负责人
18 天前 关闭了 issue
17 天前 添加了label:resolved
问题描述
ConfusionMatrix(Ascend950/arch35,!5444 合入)转测验证轮发现以下问题:
1. batch_load 策略 ResetBins 缺越界守卫
op_kernel/arch35/confusion_matrix_simt_not_full_load_ub.h的 ResetBins 缺blockIdx_ >= resetBinsCoreNum_早退,与 full_load / not_full_load_gm 两策略不一致。当前 tiling 判据下为 benign,但核数关系或参数调整后多余核会以越界 headIndex 零写 GM。2. InferShape 输入校验缺失
labels/predictions 的秩(仅接受 1D)、shape 一致性、weights shape 一致性均无校验,非法输入静默进内核。
3. weights dtype 校验位置不当(GEIR.02)
weights 与输出 dtype 的一致性校验放在 InferDataType,会对空 weights 张量(合法组合,缺省权重 1)误拒。校验应移到 tiling CheckDtype 且仅对非空 weights 生效。
4. tiling 门禁缺输入 dtype 独立校验(INFER-EXC-001)
tiling CheckDtype 未独立校验 labels/predictions 输入 dtype(五类合法集 + 两两一致),依赖前置门禁,非法 dtype 组合存在静默进内核的路径。
5. golden 实现与注释问题
output_dtypes二次astype:三方比对(Promote)下为 no-op 且隐式依赖 TTK 传递行为;_Composedocstring 声称"浮点输出 cast 回 NPU 输出 dtype"与代码不符(浮点路径实际无 cast);环境信息
修复
见关联 PR。