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。
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 编译失败。
AscendC::Reg
using namespace AscendC;
• 昇腾硬件型号:Ascend 950(arch35) • CANN版本:9.0.0 • 操作系统:不涉及 • 其他相关软件版本:不涉及
bash build.sh --ops=sort --soc=ascend950 --opkernel -j16
radix_more_core_base.h
Sort arch35 Kernel 在支持的不同 CANN 版本下均可正确解析 ReduceType 并完成编译;修复不改变 Kernel 计算逻辑、对外接口、Tiling 或运行时行为。
💡 备注(选填)
原因分析:文件已显式引入 AscendC::Reg::CreateMask、MaskReg、RegTensor 等类型,但遗漏了 AscendC::Reg::ReduceType。
AscendC::Reg::CreateMask
MaskReg
RegTensor
AscendC::Reg::ReduceType
关联整改 Issue:https://gitcode.com/cann/ops-math/issues/2665
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
• 操作系统:不涉及
• 其他相关软件版本:不涉及
三、重现步骤 (可选)
bash build.sh --ops=sort --soc=ascend950 --opkernel -j16编译 Sort arch35 Kernel。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