Closed
[Bug-Report|缺陷反馈]: Softsign动态9维输入被Host Tiling错误拦截 #6218
yulianjieAdd on  Sep 24Closed at  Sep 28
yulianjie
yulianjieCollaborators
Sep 24 Create

Describe the current behavior / 问题描述 (Mandatory / 必填)

Softsign 在 Ascend 950 动态 Shape 或动态 Rank 场景中,当运行时具体 Shape 为 9 维时,会在 Host Tiling 阶段被固定的 MAX_INPUT_RANK = 8 拦截:

Softsign: input x rank must be no greater than 8, but got 9.
[FUNC:SoftsignTilingFunc]
[FILE:softsign_tiling_arch35.cpp]

Softsign 是纯逐元素算子,后续公共 ElewiseBaseTiling 会将 StorageShape 的各维连乘为一维总元素数 dim0,Kernel 按连续内存线性处理,不依赖具体轴语义。当前 rank 检查在公共 Elewise Tiling 之前返回,阻断了本可正确执行的动态高维输入。

Environment Information / 环境信息 (Mandatory / 必填)

  • 昇腾硬件型号:Ascend950PR_9579
  • CANN 版本:9.2.0
  • TTK 版本:3.0.0(build 10293dd)
  • 算子:Softsign
  • 通路:GEIR 动态 Shape / 动态 Rank
  • dtype/format:FLOAT32 / ND

Steps to reproduce the issue / 重现步骤 (Mandatory / 必填)

  1. 构造动态 Shape 9D 用例:编译描述 [-1] × 9,运行时具体 Shape [2] × 9。
  2. 构造动态 Rank 用例:编译描述 [-2],运行时具体 Shape [2] × 9。
  3. 使用 TTK GEIR 动态模式执行:
python3 -m ttk geir -i softsign_dynamic_rank_geir.csv \
  -c=false -d=true --compare stat_rel_err \
  --pc 1 --proc-no-reuse --seed 42 --device-whitelist 0
  1. 修改前两条9D用例均在 SoftsignTilingFunc 返回 GRAPH_FAILED;对应8D control 正常 PASS。

Describe the expected behavior / 预期结果 (Mandatory / 必填)

动态 Shape 和动态 Rank 具体化为9D时,应进入公共 ElewiseBaseTiling,由其把多维 Shape 合并为一维总元素数并正常执行 Kernel;输出 Shape、dtype 与输入保持一致,数值通过 Golden 比对。

移除 Host Tiling 的固定 rank≤8 检查后,以下四条用例应全部通过:

场景 编译描述 运行时具体 Shape 期望
动态 Shape 8D control [-1] × 8 [2] × 8 PASS
动态 Shape 9D [-1] × 9 [2] × 9 PASS
动态 Rank control [-2] [2] × 8 PASS
动态 Rank 9D [-2] [2] × 9 PASS

修改前:

EZ9999: Softsign: input x rank must be no greater than 8, but got 9.
[FUNC:SoftsignTilingFunc][FILE:softsign_tiling_arch35.cpp][LINE:85]

修改后隔离包验证:

Total    : 4
PASS     : 4
FAIL     : 0
SKIP/NA  : 0
PassRate : 100.00% (4/4)

四条用例均为 DYN_GOLD: PASS。日志确认实际加载隔离 vendor softsign_rank9_test_nn,并实际 launch 本次构建的 Softsign Kernel。

Special notes for this issue/备注 (Optional / 选填)

  • 修复 PR:https://gitcode.com/cann/ops-nn/pull/11207
  • 修改仅删除 Softsign Host Tiling 中的固定 rank 上限及无用常量,不修改计算公式、dtype、TilingData 或 Kernel。
  • 当前9D真机验证覆盖 FLOAT32/ND、小 Shape;FP16/BF16 二进制已成功构建,后续可补充更多高 Rank 与大 Shape边界回归。
likedislike
yulianjieyulianjieCollaborators
Sep 24 Added label: bug-report
yulianjieyulianjieCollaborators
Sep 24 Associated pull request
yuning_chenyuning_chenCollaborators
Sep 24 Assign lianjieyu as responsible person
CANN-robotCANN-robotCollaborators
Sep 28 Close issue
CANN-robotCANN-robotCollaborators
Sep 28 Added label: resolved