Closed
[Bug-Report|缺陷反馈]: Cumsum 整数 tiling 未处理空 Tensor——rightAxisLen=0 除零(SIGFPE)、midAxisLen=0 非法分核、leftAxisLen=0 非法 tiling #4634
wangweidongAdd on 1 day agoClosed at 1 day ago
1 day ago Added label: bug-report
1 day ago Close issue
1 day ago changed custom state from 待办的 to 已完成
wangweidong
1 day ago Comments:
1 day ago Comments:
/assign @gcw_YBIAEfqJ


1 day ago Assign gcw_YBIAEfqJ as responsible person
1 day ago Added label: resolved
Describe the current behavior / 问题描述
math/cumsum/op_host/arch35/cumsum_tiling_ascendc_int_arch35.cpp(master 基线 84f3256f)整数 tiling 未处理空 Tensor。输入任一维度为 0 时,按 0 维位于 axis 的前/中/后位置,leftAxisLen/midAxisLen/rightAxisLen相应变 0,进入三条坏路径:GetAxisLpUnit:200 取raLpUnit_ = rightAxisLen = 0,后续 :217comLeftA = vlSize_ / (raLpUnit_ * dtypeSize)触发除零(SIGFPE),tiling 进程崩溃;rLpUnit_=0传导产生非法分核;laLpCnt=0,CeilDiv(0, CeilDiv(0, coreNum))产生非法 tiling。ACLNN 通路已有
self->IsEmpty()早返回兜底,但 TTK kernel/GE direct 直接进入整数 tiling,算子侧无兜底。Environment / 环境信息
Steps to reproduce the issue / 重现步骤
Describe the expected behavior / 预期结果
GetInputDims()后检测leftAxisLen/midAxisLen/rightAxisLen == 0,下发安全 empty tiling(blockDim=1/新 tilingKey11003/workspace=0),跳过 kernel 计算。GET_TILING_DATA_WITH_STRUCT注册 tiling struct size 后立即返回,不访问 GM(opc 可推导该 key 的 tiling 数据大小)。Related log / screenshot / 日志 / 截图
raLpUnit_ = rightAxisLen)、:217(vlSize_ / (raLpUnit_ * dtypeSize)除零点)、:268(laLpCnt);ACLNN 通路IsEmpty早返回与 TTK kernel/GE direct 无兜底的通路差异。perf_status=PASS;非空回归[105,2239]:axis0 key=11000/blockDim=35、axis1 key=11001/blockDim=53,precision 2/2 PASS;git diff --check通过。Special notes for this issue/备注
关联 PR:https://gitcode.com/cann/ops-math/pull/7177