Closed
[Bug-Report|缺陷反馈]: 部分算子 SoC 与架构缩写映射疑似不一致 #4458
weinachuanAdd on  Aug 20Closed at  Oct 9
weinachuanCollaborators
Aug 20 Create

当前仅完成静态扫描,尚未进行编译和硬件验证。建议优先确认涉及构建、注册和实现选择的 5 个算子,再处理命名及 UT 目录一致性问题。

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

按以下 SoC 与架构缩写对应关系扫描主线代码:

SoC 架构缩写
ascend910 arch10
ascend310p arch20
ascend310b arch30
ascend910b arch22
ascend910_93 arch22
ascend950 arch35
kirinx90 arch22

静态扫描发现以下 12 个算子存在目录、实现选择、构建配置、类名或测试平台配置与上述对应关系疑似不一致的情况:

  1. all_gather_matmul_v2:Ascend 310P tiling 位于 arch31,预期为 arch20。
  2. matmul_all_reduce:Ascend 310P kernel/tiling 位于 arch31,相关注册使用 ASCEND310P。
  3. matmul_reduce_scatter_v2:Ascend 310P tiling 位于 arch31,预期为 arch20。
  4. mat_mul_v3:arch35 tiling helper 中包含 Ascend 310P 映射。
  5. dense_lightning_indexer_kl_loss_grad_metadata:入口统一引用 arch35 实现,但实现同时处理 Ascend 910 系列平台。
  6. flash_attention_score:arch32 UT 目录中的用例使用 ASCEND910B 和 DAV_2201,预期归属 arch22。
  7. block_sparse_attention_grad:arch22 目录下存在 BlockSparseAttentionGradArch32Tiling 类名,并注册到 DAV_2201。
  8. mhc_pre_sinkhorn_backward:arch22 文件中仍使用 ARCH32 include guard 和架构注释。
  9. prompt_flash_attention:Ascend 310P UT 位于 arch22,预期为 arch20。
  10. mhc_post:arch22 UT 将 ASCEND910B 与 DAV_3002 配对,预期为 DAV_2201。
  11. moe_distribute_combine_v2:arch22 UT 使用 Ascend 950,预期为 arch35。
  12. moe_distribute_dispatch:arch22 UT 使用 Ascend 950,预期为 arch35。

此外,公共 CMake 映射未覆盖 ascend910 -> arch10 和 ascend310b -> arch30,部分 MC2 构建逻辑将 Ascend 310P 固定映射到 arch31,建议一并确认。

上述问题中部分可能仅影响命名或测试目录归属,部分可能影响实际构建、注册或实现选择,需要逐项确认。

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

ops-transformer 主线,提交 6d7f92503c19f0c94064bfe6084595f1c912eafb。

本问题由静态代码扫描发现,不涉及硬件运行环境。

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

  1. 在主线代码中搜索 ASCEND310P、ASCEND910B、ASCEND950、DAV_2201、DAV_3002、arch31 和 arch32。
  2. 检查命中代码所属算子目录、构建参数、平台注册、实现选择和 UT 配置。
  3. 按问题描述中的 SoC 与架构缩写对应关系逐项比对。
  4. 可复现上述 12 个算子的疑似不一致项。

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

  1. 算子目录、构建配置、实现选择、平台注册和测试配置统一遵循约定的 SoC 与架构缩写对应关系。
  2. 确有特殊架构分层需求的代码,应补充明确说明,避免被误认为错误映射。
  3. 修正后补充静态检查或测试,防止新增不一致映射。

静态扫描结果见问题描述,无运行日志或截图。

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

当前仅完成静态扫描,尚未进行编译和硬件验证。建议优先确认涉及构建、注册和实现选择的 5 个算子,再处理命名及 UT 目录一致性问题。

likedislike
WweinachuanCollaborators
Aug 20 Added label: bug-report
Yyue-maCollaborators
Aug 20 Associated pull request
weihao18Collaborators
Aug 20 Comments:

/assign @yue-ma

likedislike
CANN-robotCANN-robotCollaborators
Aug 20 Assign yue-ma as responsible person
Yyue-maCollaborators
Aug 25 Removed responsible person yue-ma
Yyue-maCollaborators
Aug 25 Assign SuperYuan as responsible person
Yyue-maCollaborators
Aug 25 Assign zzzzzzyf_ as responsible person
游游震Collaborators
Sep 2 Added label: feature
游震Collaborators
Sep 2 Comments:

issue问题处理面太宽,转需求处理
麻烦 @zzzzzzyf_ 拆分下要处理的事情,并规划下预期解决时间

likedislike
周云飞
周云飞Collaborators
Sep 4 Comments:

收到,规划转需求跟踪

likedislike
周云飞周云飞Collaborators
Sep 24 Removed label: bug-report
WweinachuanCollaborators
Oct 9 changed custom state from 进行中 to 已完成
WweinachuanCollaborators
Oct 9 Close issue
CANN-robotCANN-robotCollaborators
Oct 9 Added label: resolved