已关闭
[Bug-Report|缺陷反馈]: Sort arch35 Kernel 在不同 CANN 版本下 ReduceType 解析失败 #2756
黄晓彬创建于  8月20日关闭于  8月20日
黄晓彬成员
8月20日 创建

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
黄黄晓彬成员
8月20日 添加了label:bug-report
黄黄晓彬成员
8月20日 关联了pull request:fix(sort): 兼容不同 CANN 版本的 ReduceType 定义
黄黄晓彬成员
8月20日 修改了issue 的描述
黄黄晓彬成员
8月20日 修改了issue 的描述
黄黄晓彬成员
8月20日 修改了issue 的描述
黄黄晓彬成员
8月20日 修改了issue 的描述
CANN-robotCANN-robot成员
8月20日 关闭了 issue
CANN-robotCANN-robot成员
8月20日 添加了label:resolved