| Files | Last commit | Last update |
|---|---|---|
fix(aicpu): 整改代码质量告警 Co-authored-by: zhaowenrui666<zhaowenrui7@huawei.com> # message auto-generated for no-merge-commit merge: !5881 merge fix-aicpu-codecheck-warnings into master fix(aicpu): 整改代码质量告警 Created-by: zhaowenrui666 Commit-by: zhaowenrui666 Merged-by: cann-robot Description: ## 描述 整改部分 AICPU 算子的代码质量告警: - 将可替代的 reinterpret_cast 调整为 static_cast。 - 为 lambda 显式列出捕获变量,避免默认引用捕获。 - 补充成员函数 const 限定、析构函数 override 以及头文件内函数的 inline 限定。 - 修正有符号整数左移、状态码隐式布尔转换及指针顶层 const 等告警。 - 同步头文件声明与实现签名,不改变算子功能语义。 ## 关联的Issue https://gitcode.com/cann/ops-math/issues/3264 ## 测试 - cmake --build build --target aicpu_kernels -j8:通过,成功生成 libmath_aicpu_kernels.so。 - 对本次修改文件执行 pre-commit run --files ...:全部通过,包括 clang-format、codespell 和 OAT 检查。 - git diff --check:通过。 ## 文档更新 无文档变更。 ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [x] 其他,请描述:AICPU 代码质量告警整改 See merge request: cann/ops-math!5881 | 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 | |
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 | ||
| 3 months ago | ||
| 3 months ago |