| Files | Last commit | Last update |
|---|---|---|
SparseFillEmptyRows与SparseToDense检视问题整改 Co-authored-by: zhaowenrui666<zhaowenrui7@huawei.com> # message auto-generated for no-merge-commit merge: !9371 merge fix_sparse_review_issues into master SparseFillEmptyRows与SparseToDense检视问题整改 Created-by: zhaowenrui666 Commit-by: zhaowenrui666 Merged-by: cann-robot Description: ## 描述 - SparseFillEmptyRows: - InferDataType 常量统一为全大写命名。 - 错误日志改为结构化 EZ 错误宏,并补充 ShapeRange 最小值空指针校验。 - 修正 reverse_index_map 的 ShapeRange,使最小值和最大值分别跟随 indices 第一维 N 的范围上下界。 - 更新 infershape UT,覆盖动态 N 范围 [2, 5]。 - SparseToDense: - 修正 AICPU 日志中的 creat、falied 拼写。 - 删除 paralledDataSize 局部变量和重复魔法数字,统一复用 kParallelDataSize。 ## 关联的Issue 暂无。本 PR 为以下原检视 PR 合入后的整改: - https://gitcode.com/cann/ops-nn/merge_requests/8003 - https://gitcode.com/cann/ops-nn/merge_requests/8005 ## 测试 - git diff --check ups/master...HEAD:通过。 - pre-commit run --files <本PR涉及文件>:通过,OAT 扫描 4 个文件无问题。 - env CCACHE_DIR=/tmp/ccache-ops-nn-sparse-review bash build.sh -u --ophost --ops=sparse_fill_empty_rows -j8:CMake 配置阶段因本地 third_party/ops-tensor 缺少锁定提交 b6438106f46a31c05c4229e0a7fe42e66fd68bc2 阻塞,未进入 UT 编译和执行阶段。 ## 文档更新 无。 ## 类型标签 - [x] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 - [x] AI辅助编写 See merge request: cann/ops-nn!9371 | 1 month ago | |
feat(index): add SparseFillEmptyRows AICPU op Co-authored-by: zhaowenrui666<zhaowenrui7@huawei.com> # message auto-generated for no-merge-commit merge: !7571 merge sparse_fill_empty_rows into master feat(index): add SparseFillEmptyRows AICPU op Created-by: zhaowenrui666 Commit-by: zhaowenrui666 Merged-by: cann-robot Description: ## 描述 将 canndev 中的 SparseFillEmptyRows 作为 AICPU 算子迁移到 ops-nn/index/sparse_fill_empty_rows。 主要改动: - 新增 SparseFillEmptyRows AICPU kernel 实现,保持 canndev 核心语义:统计每行元素数,对空行补 [row, 0, ...] = default_value,生成 empty_row_indicator 和 reverse_index_map。 - 新增 AICPU OpDef、op_graph proto、GEIR graph example 和 AICPU UT。 - 新增算子 README,说明输入输出、空行补齐规则、dtype 支持和约束。 - 更新 docs/zh/op_list.md,将 sparse_fill_empty_rows 加入 index 分类。 本轮未新增 aclnn/op_api;canndev 中未检索到 aclnnSparseFillEmptyRows 或对应两段式接口实现。 ## 关联的Issue 无。 ## 测试 已执行: bash pre-commit run --files docs/zh/op_list.md index/sparse_fill_empty_rows/CMakeLists.txt index/sparse_fill_empty_rows/README.md index/sparse_fill_empty_rows/examples/test_geir_sparse_fill_empty_rows.cpp index/sparse_fill_empty_rows/op_graph/CMakeLists.txt index/sparse_fill_empty_rows/op_graph/sparse_fill_empty_rows_proto.h index/sparse_fill_empty_rows/op_kernel_aicpu/CMakeLists.txt index/sparse_fill_empty_rows/op_kernel_aicpu/sparse_fill_empty_rows_aicpu.cpp index/sparse_fill_empty_rows/op_kernel_aicpu/sparse_fill_empty_rows_aicpu.h index/sparse_fill_empty_rows/op_kernel_aicpu/sparse_fill_empty_rows_aicpu_def.cpp index/sparse_fill_empty_rows/tests/CMakeLists.txt index/sparse_fill_empty_rows/tests/ut/CMakeLists.txt index/sparse_fill_empty_rows/tests/ut/op_kernel_aicpu/test_sparse_fill_empty_rows.cpp 结果:通过。 已执行 AICPU UT: bash bash build.sh --opkernel_aicpu_test --ops=sparse_fill_empty_rows -j8 结果:33 个 TEST_SPARSE_FILL_EMPTY_ROWS_UT 用例通过。 已执行自定义包和 GEIR example 验证: bash bash build.sh --pkg --ops=sparse_fill_empty_rows --vendor_name=sfer -j8 ./build_out/cann-ops-nn-sfer_linux-aarch64.run export ASCEND_CUSTOM_OPP_PATH=/home/developer/Ascend/cann-9.0.0/opp/vendors/sfer_nn export LD_LIBRARY_PATH=/home/developer/Ascend/cann-9.0.0/opp/vendors/sfer_nn/op_api/lib:${LD_LIBRARY_PATH} export ASCEND_GLOBAL_LOG_LEVEL=0 bash build.sh --run_example sparse_fill_empty_rows graph 结果:通过。日志确认走到自定义 AICPU kernel:RunCpuKernel[SparseFillEmptyRows] 出现在 aicpu_custom_scheduler 路径下。 ## 文档更新 - 新增 index/sparse_fill_empty_rows/README.md。 - 更新 docs/zh/op_list.md。 ## 类型标签 - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [x] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 - [x] AI辅助编写 See merge request: cann/ops-nn!7571 | 3 months ago |