已关闭
[Bug-Report|缺陷反馈]: QuantBatchMatMulV3 一维 bias shape 报错缺少方括号 #6129
Hu1L1创建于 9月22日关闭于 9月24日
9月22日 添加了label:bug-report
9月22日 关联了pull request:fix(qbmm): 修复 bias shape 报错缺少方括号(master)
9月22日 关联了pull request:fix(qbmm): 修复 bias shape 报错缺少方括号(9.2.0)
Hu1L1
9月22日 评论:
9月22日 评论:
/assign


9月22日 将 Hu1L1 设为负责人
9月24日 关闭了 issue
9月24日 添加了label:resolved
Thanks for sending an issue! Please fill in the following template to help quickly solve your problem.
Describe the current behavior / 问题描述 (Mandatory / 必填)
QuantBatchMatMulV3 的一维 bias shape 校验报错中,实际 shape 缺少方括号,与 reason 中的期望 shape 格式不一致。
代码位置:
matmul/quant_batch_matmul_v3/op_api/quant_matmul_checker.cpp,QuantMatmulChecker::CheckBiasShape()。执行到该函数、
biasDimNum == 1且biasFirstDim != x2NDim_时,调用OP_LOGE_FOR_INVALID_SHAPE_WITH_REASON。第三个参数使用std::to_string(biasFirstDim).c_str(),因此实际长度为 16 时传入的是16,而期望的形状表示为[16]。该问题涉及此分支的普通日志及 EZ0009 上报参数格式,不涉及计算结果或三维 bias 分支。
Environment Information / 环境信息 (Mandatory / 必填)
源码检查基线:
master:d83bd1684f9ba6dd7f8c6aa1024796fddce2e9b1。9.2.0:6d94b9eead9c7c887d07ee6757abf7f0df960eae。Steps to reproduce the issue / 重现步骤 (Mandatory / 必填)
源码级定位步骤(非端到端运行复现):
matmul/quant_batch_matmul_v3/op_api/quant_matmul_checker.cpp中的QuantMatmulChecker::CheckBiasShape()。biasDimNum == 1分支,在biasFirstDim != x2NDim_时检查其错误上报调用。std::to_string(biasFirstDim).c_str(),只包含数字。biasFirstDim == 16、x2NDim_ == 64,实际 shape 文本为16,reason 中期望 shape 为[64]。两处形状表示不一致。Describe the expected behavior / 预期结果 (Mandatory / 必填)
实际 shape 应使用方括号表示。例如上述分支应输出
incorrect shape [16],与期望 shape[64]的表示方式一致。在该分支中,实际长度为 0 时同样应表示为
[0]。保持原有校验条件、返回值、错误码和 reason 不变。Related log / screenshot / 日志 / 截图 (Mandatory / 必填)
以下为根据源码格式串推导的示例,非设备运行日志;
<apiName>为算子接口名称占位符。当前:
预期:
Special notes for this issue/备注 (Optional / 选填)
修复方式:在算子调用处将第三个参数改为
"[" + std::to_string(biasFirstDim) + "]",显式构造一维 shape 文本。关联修复 PR:
两条 PR 均仅修改一个文件的一行。
git diff --check通过;未执行算子编译、UT 或设备测试。本 Issue 由 AI 辅助整理。