| Files | Last commit | Last update |
|---|---|---|
[Fix] AICPU 算子代码规范告警清理 Co-authored-by: liu-wei<lovline.liuwei@huawei.com> # message auto-generated for no-merge-commit merge: !5856 merge fix/aicpu-code-quality-warnings into master [Fix] AICPU 算子代码规范告警清理 Created-by: liu-wei Commit-by: liu-wei Merged-by: cann-robot Description: ## 告警清理 修复 6 条代码规范告警(G.FMT.14 / G.CNS.03 / G.FUN.02),共 7 个文件 +10/-10: | 告警 | 文件 | 修复 | |---|---|---| | G.FMT.14 ×1 | greater_equal_aicpu.cpp | char const* 统一为 const char* 风格(同一类型,纯风格修正) | | G.CNS.03 ×1 | tile_aicpu.cpp/.h | GetMultiplesValue 补充 const 修饰 | | G.FUN.02 ×1 | top_k_pq_distance_aicpu.cpp | PopHeap 定义补充 * const 与声明一致 | | G.CNS.03 ×2 | top_k_pq_distance_aicpu.h/.cpp | MakeHeap/SortHeap 补充 const 修饰 | | G.CNS.03 ×1 | top_k_v2_d_aicpu.h/.cpp | DispatchByDtype 补充 const 修饰 | ## 未包含项(与初版正文的差异说明) - strided_slice 的 G.EXP.27 ×4(有符号数位运算 UB)**不在本 PR 范围**,将另行跟进修复 - trans_data 的 G.CNS.04 ×2 为**误报**:DispatchDealData 的参数经 aicpu::PtrToPtr 写入,AICPU 公共头无 const 重载,加 const 编译失败(初版曾尝试修改,复检确认编译问题后已回退) ## 关联的Issue https://gitcode.com/cann/ops-math/issues/3268 ## 验证 - 二进制级对比(父提交 vs 本提交,同路径同编译参数):4 个改动 TU 的全部机器码节(.text\* 共 1254 节)**逐字节相同**,greater_equal/top_k_pq_distance 目标文件整体逐位相同;tile/top_k_v2_d 仅 const 成员函数符号修饰名(_ZN→_ZNK)及符号表/重定位元数据变化,均为 private 成员、无外部 ABI 影响——**零功能影响** - 平台风险复检:未发现可证明的功能或编译问题 - CI 流水线通过 ## 类型 🧹 代码清理 See merge request: cann/ops-math!5856 | 1 month ago | |
[Fix] AICPU 算子代码规范告警清理 Co-authored-by: liu-wei<lovline.liuwei@huawei.com> # message auto-generated for no-merge-commit merge: !5856 merge fix/aicpu-code-quality-warnings into master [Fix] AICPU 算子代码规范告警清理 Created-by: liu-wei Commit-by: liu-wei Merged-by: cann-robot Description: ## 告警清理 修复 6 条代码规范告警(G.FMT.14 / G.CNS.03 / G.FUN.02),共 7 个文件 +10/-10: | 告警 | 文件 | 修复 | |---|---|---| | G.FMT.14 ×1 | greater_equal_aicpu.cpp | char const* 统一为 const char* 风格(同一类型,纯风格修正) | | G.CNS.03 ×1 | tile_aicpu.cpp/.h | GetMultiplesValue 补充 const 修饰 | | G.FUN.02 ×1 | top_k_pq_distance_aicpu.cpp | PopHeap 定义补充 * const 与声明一致 | | G.CNS.03 ×2 | top_k_pq_distance_aicpu.h/.cpp | MakeHeap/SortHeap 补充 const 修饰 | | G.CNS.03 ×1 | top_k_v2_d_aicpu.h/.cpp | DispatchByDtype 补充 const 修饰 | ## 未包含项(与初版正文的差异说明) - strided_slice 的 G.EXP.27 ×4(有符号数位运算 UB)**不在本 PR 范围**,将另行跟进修复 - trans_data 的 G.CNS.04 ×2 为**误报**:DispatchDealData 的参数经 aicpu::PtrToPtr 写入,AICPU 公共头无 const 重载,加 const 编译失败(初版曾尝试修改,复检确认编译问题后已回退) ## 关联的Issue https://gitcode.com/cann/ops-math/issues/3268 ## 验证 - 二进制级对比(父提交 vs 本提交,同路径同编译参数):4 个改动 TU 的全部机器码节(.text\* 共 1254 节)**逐字节相同**,greater_equal/top_k_pq_distance 目标文件整体逐位相同;tile/top_k_v2_d 仅 const 成员函数符号修饰名(_ZN→_ZNK)及符号表/重定位元数据变化,均为 private 成员、无外部 ABI 影响——**零功能影响** - 平台风险复检:未发现可证明的功能或编译问题 - CI 流水线通过 ## 类型 🧹 代码清理 See merge request: cann/ops-math!5856 | 1 month ago | |
add aicpu:tile_with_axis&topkpqdistance Co-authored-by: sujunwei3<sujunwei3@huawei.com> # message auto-generated for no-merge-commit merge: !4174 merge dev into master add aicpu:tile_with_axis&topkpqdistance Created-by: sujunwei3 Commit-by: sujunwei3 Merged-by: cann-robot Description: ## 描述 新增四个 AI CPU 算子: 1. **tile_with_axis**(conversion):沿指定维度复制输入 Tensor 数据,扩展输出 Tensor。包含 AI Core 和 AI CPU 双实现。 2. **top_k_pq_distance**(math):基于分组极值剪枝的 TopK 距离计算,用于向量检索场景。支持动态多组输入。 3. **top_k_v2_d**(math):沿指定维度找出最大或最小的 k 个元素及其索引,兼容 TensorFlow TopKV2,包含 infershape 实现。 4. **zeta**(math):计算 Hurwitz zeta 函数 ζ(x, q) = Σ(n=0→∞) 1/(q+n)^x。 每个算子包含:op_kernel_aicpu 实现、op_graph 构图定义、examples 示例、UT 单元测试、README 文档。 ## 关联的Issue #2294 ## 测试 根据代码变更,测试场景如下: 1. **tile_with_axis 单元测试 + GE IR 验证** - 执行 bash build.sh -u --opkernel_aicpu --ops=tile_with_axis --soc=ascend910b,17 个 UT 全部通过 - 执行编包 + GE IR 运行,execute samples success,输出 bin 文件正常 2. **top_k_pq_distance 单元测试** - 执行 bash build.sh -u --opkernel_aicpu --ops=top_k_pq_distance --soc=ascend910b,5 个 UT 全部通过 3. **top_k_v2_d 单元测试 + GE IR 验证** - 执行 bash build.sh -u --opkernel_aicpu --ops=top_k_v2_d --soc=ascend910b,UT 全部通过 - 执行编包 + GE IR 运行,验证通过 4. **zeta 单元测试 + GE IR 验证** - 执行 bash build.sh -u --opkernel_aicpu --ops=zeta --soc=ascend910b,8 个 UT 全部通过 - 执行编包 + GE IR 运行,execute samples success,输出 bin 文件正常 ## 文档更新 - 新增 4 个算子 README.md(tile_with_axis、top_k_pq_distance、top_k_v2_d、zeta) - 更新 docs/zh/op_list.md,新增 4 个算子条目 ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [x] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-math!4174 | 3 months ago |
| Files | Last commit | Last update |
|---|---|---|
| 1 month ago | ||
| 1 month ago | ||
| 3 months ago |