| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
fix: 修复aclnnLtScalar非RegBase路径空指针错误码 Co-authored-by: chenyifeng<chenyifeng27@h-partners.com> # message auto-generated for no-merge-commit merge: !6749 merge fix_LtScalar_1027 into master fix: 修复aclnnLtScalar非RegBase路径空指针错误码 Created-by: chen_0715 Commit-by: chenyifeng Merged-by: cann-robot Description: ## 背景 Issue #3913:aclnnLtScalar / aclnnInplaceLtScalar 在 self / other(原地 selfRef)传空指针时,非 RegBase(A2/A3)路径返回 ACLNN_ERR_INNER_NULLPTR(561103),与资料要求及 RegBase 路径的 ACLNN_ERR_PARAM_NULLPTR(161001) 不一致,且与同函数内 out 空指针的返回码矛盾。 ## 修改 math/less/op_api/aclnn_lt_scalar.cpp 非 RegBase 路径 aclnnLtScalarGetWorkspaceSize: - CHECK_RET(other != nullptr, ACLNN_ERR_INNER_NULLPTR) -> ACLNN_ERR_PARAM_NULLPTR - CHECK_RET(self != nullptr, ACLNN_ERR_INNER_NULLPTR) -> ACLNN_ERR_PARAM_NULLPTR aclnnInplaceLtScalarGetWorkspaceSize 经 const_cast 转发到同一函数,selfRef 场景自动覆盖。 ## UT 同步 同步更新 4 处 UT 空指针断言(test_lt_scalar.cpp / test_inplace_lt_scalar.cpp)为 ACLNN_ERR_PARAM_NULLPTR。 ## 验证 - A2(910B3)/ CANN 9.2.0 环境构建 opapi 库成功(bash build.sh --opapi) - 链接修改后构建的 libopapi_math.so 运行复现用例,6 场景全部符合预期: - 合法输入 -> 0(无回归) - self / other / selfRef 空指针 -> 161001 - out 空指针 -> 161001(与修改前一致) See merge request: cann/ops-math!6749 | 16 天前 | |
coalesce_sparse/cummin适配960dt Co-authored-by: TH<taohai2@huawei.com> # message auto-generated for no-merge-commit merge: !6776 merge backBlue1 into master coalesce_sparse/cummin适配960dt Created-by: TH_HW Commit-by: TH Merged-by: cann-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> 本次改动为 CoalesceSparse、Cummin 两个算子新增 Ascend960DT(NpuArch::DAV_9201)平台支持,使二者可在 Ascend960DT 上完成注册、编译与运行。 具体改动: - CoalesceSparse(conversion/coalesce_sparse): - 在 op_host/coalesce_sparse_def.cpp 中新增 this->AICore().AddConfig("ascend960dt", aicore_config),完成 Ascend960DT 计算单元注册;同时对输入/输出 DataType、Format、UnknownShapeFormat 的换行格式做统一整改,并补齐文件末尾换行。 - 在 op_host/coalesce_sparse_tiling.cpp 的 TilingKeyCalcu、TilingDataCalcu 中,将 isAscend950 判定由仅 DAV_3510 扩展为 DAV_3510 || DAV_9201,使 Ascend960DT 复用 Ascend950 的 tiling key 与多核任务切分逻辑。 - 新增 op_host/config/ascend960dt/coalesce_sparse_binary.json,覆盖 12 组 dtype 组合(unique_len/unique_indices 为 int64/int32,indices 为 int64/int32,values 为 float32/float16/int32);新增 coalesce_sparse_simplified_key.ini(default=0)。 - Cummin(math/cummin): - 在 CMakeLists.txt 的 SUPPORT_COMPUTE_UNIT 中加入 ascend960dt,并在 SUPPORT_TILING_DIR 中补入对应的 arch35 tiling 目录。 - 在 op_host/cummin_def.cpp 中新增 AddConfig("ascend960dt", aicoreConfig),并补齐文件末尾换行。 - 新增 op_host/config/ascend960dt/cummin_binary.json,覆盖 float16/bfloat16/float32/int32 四组 dtype(输入输出同 dtype,另输出 int32 的 argmin);新增 cummin_simplified_key.ini(default=0)。 - 二进制配置:在 scripts/kernel/binary_config/ascendc_config.json 中,为 CoalesceSparse 的 compute_units 增加 ascend960dt 并补充 ascend960dt 的 compile_options(-mllvm -cce-aicore-dcci-before-kernel-end=false);为 Cummin 的 compute_units 增加 ascend960dt。 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。--> <!-- 如果这个PR是为了解决特定的问题单,请在这里描述问题单单号。--> NA ## 测试 <!--描述进行了哪些测试来验证你的改动。包括但不限于二级冒烟、算子泛化等。--> - 编译验证:执行 math 仓编包,确认 CoalesceSparse、Cummin 在 Ascend960DT 下均能正常注册与编译,并生成对应 kernel 二进制。 - 二进制/交付件验证:确认两算子 config/ascend960dt 下的 *_binary.json 与 *_simplified_key.ini 生效,ascendc_config.json 中已包含对应的 ascend960dt 编译单元。 - 功能验证:在 Ascend960DT 上分别运行两算子的 aclnn 用例,覆盖各自 binary 配置中的 dtype 与 shape 组合,结果与 Golden 一致。 ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> 无 ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-math!6776 | 15 天前 | |
add op cummin for ascend950 Co-authored-by: sakuraqqz<furao15@h-partners.com> # message auto-generated for no-merge-commit merge: !1447 merge cummin_A5 into master add op cummin for ascend950 Created-by: sakuraqqz Commit-by: sakuraqqz Merged-by: cann-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> 新增ascend950上的cummin实现。 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。--> <!-- 如果这个PR是为了解决特定的问题单,请在这里描述问题单单号。--> https://gitcode.com/cann/ops-math/issues/844 ## 测试 <!--描述进行了哪些测试来验证你的改动。包括但不限于二级冒烟、算子泛化等。-->  ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-math!1447 | 8 个月前 | |
coalesce_sparse/cummin适配960dt Co-authored-by: TH<taohai2@huawei.com> # message auto-generated for no-merge-commit merge: !6776 merge backBlue1 into master coalesce_sparse/cummin适配960dt Created-by: TH_HW Commit-by: TH Merged-by: cann-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> 本次改动为 CoalesceSparse、Cummin 两个算子新增 Ascend960DT(NpuArch::DAV_9201)平台支持,使二者可在 Ascend960DT 上完成注册、编译与运行。 具体改动: - CoalesceSparse(conversion/coalesce_sparse): - 在 op_host/coalesce_sparse_def.cpp 中新增 this->AICore().AddConfig("ascend960dt", aicore_config),完成 Ascend960DT 计算单元注册;同时对输入/输出 DataType、Format、UnknownShapeFormat 的换行格式做统一整改,并补齐文件末尾换行。 - 在 op_host/coalesce_sparse_tiling.cpp 的 TilingKeyCalcu、TilingDataCalcu 中,将 isAscend950 判定由仅 DAV_3510 扩展为 DAV_3510 || DAV_9201,使 Ascend960DT 复用 Ascend950 的 tiling key 与多核任务切分逻辑。 - 新增 op_host/config/ascend960dt/coalesce_sparse_binary.json,覆盖 12 组 dtype 组合(unique_len/unique_indices 为 int64/int32,indices 为 int64/int32,values 为 float32/float16/int32);新增 coalesce_sparse_simplified_key.ini(default=0)。 - Cummin(math/cummin): - 在 CMakeLists.txt 的 SUPPORT_COMPUTE_UNIT 中加入 ascend960dt,并在 SUPPORT_TILING_DIR 中补入对应的 arch35 tiling 目录。 - 在 op_host/cummin_def.cpp 中新增 AddConfig("ascend960dt", aicoreConfig),并补齐文件末尾换行。 - 新增 op_host/config/ascend960dt/cummin_binary.json,覆盖 float16/bfloat16/float32/int32 四组 dtype(输入输出同 dtype,另输出 int32 的 argmin);新增 cummin_simplified_key.ini(default=0)。 - 二进制配置:在 scripts/kernel/binary_config/ascendc_config.json 中,为 CoalesceSparse 的 compute_units 增加 ascend960dt 并补充 ascend960dt 的 compile_options(-mllvm -cce-aicore-dcci-before-kernel-end=false);为 Cummin 的 compute_units 增加 ascend960dt。 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。--> <!-- 如果这个PR是为了解决特定的问题单,请在这里描述问题单单号。--> NA ## 测试 <!--描述进行了哪些测试来验证你的改动。包括但不限于二级冒烟、算子泛化等。--> - 编译验证:执行 math 仓编包,确认 CoalesceSparse、Cummin 在 Ascend960DT 下均能正常注册与编译,并生成对应 kernel 二进制。 - 二进制/交付件验证:确认两算子 config/ascend960dt 下的 *_binary.json 与 *_simplified_key.ini 生效,ascendc_config.json 中已包含对应的 ascend960dt 编译单元。 - 功能验证:在 Ascend960DT 上分别运行两算子的 aclnn 用例,覆盖各自 binary 配置中的 dtype 与 shape 组合,结果与 Golden 一致。 ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> 无 ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-math!6776 | 15 天前 | |
fix: E*9****内部错误码整改为正式语义码并保留内部异常EZ9999上报 Co-authored-by: chenyifeng<chenyifeng27@h-partners.com> # message auto-generated for no-merge-commit merge: !6606 merge fix_errorNum_1021 into master fix: E*9****内部错误码整改为正式语义码并保留内部异常EZ9999上报 Created-by: chen_0715 Commit-by: chenyifeng Merged-by: cann-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> 本次 PR 整改以下 43 个算子中非法使用的内部错误码(E*9****),使其符合错误码使用规范: - cholesky / complex / cross / cummax / cummin / cumprod / get_shape / histogram_v2 / is_finite / is_inf - kl_div_v2 / lin_space / log_add_exp / non_finite_check / pdist / polar / pows / radix_top_k - reduce_log_sum / reduce_log_sum_exp / reduce_max / reduce_mean / reduce_mean_with_count / reduce_min - reduce_nansum / reduce_std_with_mean / rfft1_d / search_sorted / signbit / sin / sinc / sinkhorn / topk - affine_grid / amp_update_scale / angle_v2 / arg_max_v2 / arg_min / arg_min_with_value / atan2 / bessel_i1e / cdist_grad - conversion/tril 改动原因:上述算子 op_host / op_api / op_graph 源码中存在裸 OP_LOGE (EZ9999 兜底上报)、 OP_CHECK_NULL_WITH_CONTEXT / OP_CHECK_NOTNULL (EZ9999 上报)等不符合错误码使用规范的上报路径,需按失败原因分类整改为正式语义码或内部透传。 采取的方法: - op_host 参数/输入校验类(shape / dtype / format / attr 值域等)裸 OP_LOGE → 正式语义宏(EZ0004 / EZ0008–EZ0038) - op_host 内部 API 失败类(平台能力查询、tiling API 失败等)→ OP_LOGE_WITHOUT_REPORT 透传,去掉 EZ9999 上报、保留日志 - OP_CHECK_NULL_WITH_CONTEXT (EZ9999)→ 显式空指针检查 + 正式码宏 - op_api OP_CHECK_NOTNULL (EZ9999)→ 显式检查 + OP_LOGE_WITHOUT_REPORT(ACLNN_ERR_INNER_NULLPTR) + 返回公共错误码 - op_api OP_LOGE(ACLNN_ERR_INNER_* / RUNTIME_ERROR) (561xxx / 361xxx)→ OP_LOGE_WITHOUT_REPORT ;正式参数码 ACLNN_ERR_PARAM_* (161xxx)保留 - 删除 CREATE_EXECUTOR 之后不可达的空指针死检查( CHECK_RET(executor.get()!=nullptr, ACLNN_ERR_INNER_CREATE_EXECUTOR) ,40 处) - op_graph(histogram_v2 / reduce_mean 融合 pass)E9 上报 → 正式码或透传 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。--> <!-- 如果这个PR是为了解决特定的问题单,请在这里描述问题单单号。--> https://gitcode.com/cann/ops-math/issues/3977 ## 测试 <!--描述进行了哪些测试来验证你的改动。包括但不限于二级冒烟、算子泛化等。--> - 43 算子 op_host / op_api / op_graph 全量编译通过,exit 0(910b + 950/arch35) - 本地增加ut测试130 用例全量通过(910b 83 + 950 47),日志级验证触发 78 次正式 EZ 错误码上报,覆盖 14 个正式错误码 - 原版 math_op_host_ut 300 用例全量通过,无回归 - 静态复扫:范围内 E*9**** 正式上报清零(残留均为 CHECK_RET 返回公共码 / 动态 return 等允许项) - 附:适配 CANN 9.3.0 atvoss 库 tiling key 编码变化,更新 reduce_max / reduce_mean_with_count 测试的 9 处 expectedTilingKey (官方 master 在 9.3.0 下同样失败,非本 PR 引入) ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [x] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-math!6606 | 18 天前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 16 天前 | ||
| 15 天前 | ||
| 8 个月前 | ||
| 15 天前 | ||
| 18 天前 |