Closed
[Bug-Report|缺陷反馈]: Sort arch35 Kernel 在不同 CANN 版本下 ReduceType 解析失败 #2756
黄晓彬Add on  Aug 20Closed at  Aug 20
黄晓彬Collaborators
Aug 20 Create

Thanks for sending an issue! Please fill in the following template to help quickly solve your problem.

一、问题描述 (必填)

Issue #2665 对应的 arch35 MicroAPI 旧接口整改将 ReduceSum 替换为 Reg::Reduce<ReduceType::SUM> 后,math/sort/op_kernel/arch35/common/radix_more_core_base.h 中三处调用直接使用了未限定命名空间的 ReduceType。

ReduceType 实际定义在 AscendC::Reg 命名空间。不同 CANN 版本的头文件导出方式存在差异,仅依赖 using namespace AscendC; 无法稳定解析嵌套命名空间中的 ReduceType,导致部分 CANN 版本下 Sort arch35 Kernel 编译失败。

二、环境信息 (可选)

• 昇腾硬件型号:Ascend 950(arch35)
• CANN版本:9.0.0
• 操作系统:不涉及
• 其他相关软件版本:不涉及

三、重现步骤 (可选)

  1. 使用 9.0.0 CANN 版本。
  2. 获取已合入 Issue #2665 对应 MicroAPI 整改的 ops-math 代码。
  3. 执行 bash build.sh --ops=sort --soc=ascend950 --opkernel -j16 编译 Sort arch35 Kernel。
  4. 编译 radix_more_core_base.h 时,三处 Reg::Reduce<ReduceType::SUM> 无法解析未限定命名空间的 ReduceType。

四、预期结果 (可选)

Sort arch35 Kernel 在支持的不同 CANN 版本下均可正确解析 ReduceType 并完成编译;修复不改变 Kernel 计算逻辑、对外接口、Tiling 或运行时行为。

💡 备注(选填)

原因分析:文件已显式引入 AscendC::Reg::CreateMask、MaskReg、RegTensor 等类型,但遗漏了 AscendC::Reg::ReduceType。

关联整改 Issue:https://gitcode.com/cann/ops-math/issues/2665

likedislike
黄黄晓彬Collaborators
Aug 20 Added label: bug-report
黄黄晓彬Collaborators
Aug 20 Associated pull request
黄黄晓彬Collaborators
Aug 20 Modify description of issue
黄黄晓彬Collaborators
Aug 20 Modify description of issue
黄黄晓彬Collaborators
Aug 20 Modify description of issue
黄黄晓彬Collaborators
Aug 20 Modify description of issue
CANN-robotCANN-robotCollaborators
Aug 20 Close issue
CANN-robotCANN-robotCollaborators
Aug 20 Added label: resolved