已关闭
[Bug-Report|缺陷反馈]: swiglu_mx_quant_with_dual_axis tiling scale2Ub 估算与 kernel 实际 UB 分配不一致 #7580
chenfeng创建于 4 天前关闭于 3 天前
4 天前 添加了label:bug-report
chenfeng
4 天前 评论:
4 天前 评论:
/assign @chenfeng61


4 天前 将 chenfeng61 设为负责人
3 天前 关闭了 issue
3 天前 添加了label:resolved
Describe the current behavior / 问题描述
swiglu_mx_quant_with_dual_axis(arch35)存在两处问题:1. tiling 侧 scale2Ub 估算低估 256B(UB 容量校验存在失效风险)
ComputeTilingParams()(op_host/arch35/swiglu_mx_quant_with_dual_axis_tiling_arch35.cpp)恒按scale2Ub = blockW * DIGIT_THREE * DB估算(blockW=DIGIT_256、DB=2,即恒 1536B),未区分 scaleAlg 分支。Init()(op_kernel/arch35/swiglu_mx_quant_with_dual_axis_regbase.h)在scaleAlg != TPL_SCALE_ALG_0(cuBLAS 路径)时mxScaleQueue2_单 buffer 取CUBLAS_SCALE2_BUFFER_BYTES,被static_assert(... == 896U)钉死为 896B;InitBuffer(mxScaleQueue2_, DB_BUFFER, ...)双 buffer 实际占用 1792B。allNeedUb容量检查存在失效风险。2. aclnn 文档输出「非连续Tensor」约束标注错误
docs/aclnnSwigluMxQuantWithDualAxis.md中 y1Out/mxscale1Out/y2Out/mxscale2Out 的「非连续Tensor」列标为 √,与实际不符(输出不支持非连续 Tensor,与 dynamic_mx_quant_with_dual_axis 口径不一致),应为 ×。Environment Information / 环境信息
Steps to reproduce the issue / 重现步骤
ComputeTilingParams()的scale2Ub = blockW * DIGIT_THREE * DB(未区分 scaleAlg)。CUBLAS_SCALE2_BUFFER_BYTES定义与static_assert(... == 896U)、Init()中scaleAlg != TPL_SCALE_ALG_0分支及InitBuffer(mxScaleQueue2_, DB_BUFFER, ...)。Describe the expected behavior / 预期结果
CUBLAS_SCALE2_BUFFER_BYTES * DB估算,OCP 路径维持原值。Related log / screenshot / 日志 / 截图
无运行时日志(代码检视发现)。关键位置:tiling 侧 ComputeTilingParams();kernel 侧 regbase.h 常量定义、static_assert、Init() 分支、InitBuffer 双 buffer。
Special notes for this issue/备注
关联 PR:https://gitcode.com/cann/ops-nn/pull/12957