| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
根据markdownlint规范修正md写作问题和link失效 Co-authored-by: gitcode-chenjiao<chenjiao31@huawei.com> # message auto-generated for no-merge-commit merge: !6398 merge master into master 根据markdownlint规范修正md写作问题和link失效 Created-by: gitcode-chenjiao Commit-by: gitcode-chenjiao Merged-by: cann-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> 根据markdownlint规范修正md写作问题和link失效 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。--> <!-- 如果这个PR是为了解决特定的问题单,请在这里描述问题单单号。--> [#2272](https://gitcode.com/cann/ops-math/issues/2272) ## 测试 <!--描述进行了哪些测试来验证你的改动。包括但不限于二级冒烟、算子泛化等。--> ok ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> 所有md ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [x] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-math!6398 | 9 天前 | |
aclnnMinDim、aclnnIsNegInf.md、test_aclnn_atan2.cpp、test_aclnn_inplace_lt_tensor.cpp等文档&exmaple存在问题,需要整改 Co-authored-by: jiangjiawei<jiangjiawei10@huawei.com> # message auto-generated for no-merge-commit merge: !5294 merge fix_example into master aclnnMinDim、aclnnIsNegInf.md、test_aclnn_atan2.cpp、test_aclnn_inplace_lt_tensor.cpp等文档&exmaple存在问题,需要整改 Created-by: jiangjiawei Commit-by: jiangjiawei Merged-by: cann-robot Description: ## 描述 修改aclnn文档&example ## 关联的Issue https://gitcode.com/cann/ops-math/issues/3002 ## 测试 资料问题,不涉及 ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [x] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-math!5294 | 1 个月前 | |
迁移开源TF插件--math Co-authored-by: yaochen<yaochen15@huawei.com> # message auto-generated for no-merge-commit merge: !4308 merge transfer-math into master 迁移开源TF插件--math Created-by: nextyale Commit-by: yaochen Merged-by: cann-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。--> <!-- 如果这个PR是为了解决特定的问题单,请在这里描述问题单单号。--> ## 测试 <!--描述进行了哪些测试来验证你的改动。包括但不限于二级冒烟、算子泛化等。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [x] 其他,请描述:迁移TF插件 See merge request: cann/ops-math!4308 | 2 个月前 | |
docs(atan2): 对齐象限公式与实现流程 Co-authored-by: little_apple_12<020716ljh@gmail.com> # message auto-generated for no-merge-commit merge: !6244 merge fix/ops-math-2026-10-04-002 into master docs(atan2): 对齐象限公式与实现流程 Created-by: little_apple_12 Commit-by: little_apple_12 Merged-by: cann-robot Description: ## 描述 aclnnAtan2 的文档和公开头文件原先将双参数运算写成 tan^{-1}(self_i/other_i),丢失了 atan2 的象限语义;头文件流程图还把实际的 l0op::Atan2 标成了 l0op::Atan。根因是公式和流程图未与双输入实现保持一致。 本 PR 仅修改文档和公开头文件注释,不改变 API、kernel、运行时逻辑或测试逻辑。 逐 hunk 对账: 1. math/atan2/docs/aclnnAtan2&aclnnInplaceAtan2.md 公式 hunk:将功能说明改为 atan2(self_i, other_i)。 2. math/atan2/op_api/aclnn_atan2.h 第一段接口公式 hunk:同步改为双参数 atan2。 3. 同一头文件第二段接口公式与流程图 hunk:公式改为 atan2;流程图补齐 Self、Other 两路 l0op::Contiguous/l0op::Cast,汇入 l0op::Atan2,再经过输出 l0op::Cast/l0op::ViewCopy。 4. 同一头文件原位接口公式 hunk:同步改为双参数 atan2。 除上述四个 diff hunk 外无其他改动。 ## 关联的Issue 关联 issue #3401 ## 测试 静态文档回归、流程图/实现对账与空白检查均已实际执行: bash python3 - <<'PY' from pathlib import Path doc = Path("math/atan2/docs/aclnnAtan2&aclnnInplaceAtan2.md").read_text() header = Path("math/atan2/op_api/aclnn_atan2.h").read_text() impl = Path("math/atan2/op_api/aclnn_atan2.cpp").read_text() old = "tan^{-1}(self_{i}/other_{i})" new = "atan2(self_{i}, other_{i})" assert old not in doc + header assert doc.count(new) == 1, doc.count(new) assert header.count(new) == 3, header.count(new) for node in ( "A1[(Self)] --> B1([l0op::Contiguous]) --> C1([l0op::Cast]) --> D([l0op::Atan2])", "A2[(Other)] --> B2([l0op::Contiguous]) --> C2([l0op::Cast]) --> D([l0op::Atan2])", "D --> E([l0op::Cast]) --> F([l0op::ViewCopy]) --> G[(Out)]", ): assert node in header, node assert "l0op::Atan])" not in header assert "l0op::Atan2(selfCast, otherCast" in impl print(f"old_formula_count=0 new_formula_count={doc.count(new) + header.count(new)}") print("flowchart_inputs=Self,Other") print("flowchart_op=l0op::Atan2") print("flowchart_output=l0op::Cast->l0op::ViewCopy") print("implementation_call=l0op::Atan2(selfCast, otherCast, uniqueExecutor.get())") PY git diff --check printf '%s\n' 'static_documentation_check=PASS' grep -nF 'out_{i}=atan2(self_{i}, other_{i})' 'math/atan2/docs/aclnnAtan2&aclnnInplaceAtan2.md' math/atan2/op_api/aclnn_atan2.h grep -nF 'l0op::Atan2' math/atan2/op_api/aclnn_atan2.h math/atan2/op_api/aclnn_atan2.cpp 真实输出: text old_formula_count=0 new_formula_count=4 flowchart_inputs=Self,Other flowchart_op=l0op::Atan2 flowchart_output=l0op::Cast->l0op::ViewCopy implementation_call=l0op::Atan2(selfCast, otherCast, uniqueExecutor.get()) static_documentation_check=PASS math/atan2/docs/aclnnAtan2&aclnnInplaceAtan2.md:33: out_{i}=atan2(self_{i}, other_{i}) math/atan2/op_api/aclnn_atan2.h:25: * out_{i}=atan2(self_{i}, other_{i}) math/atan2/op_api/aclnn_atan2.h:43: * out_{i}=atan2(self_{i}, other_{i}) math/atan2/op_api/aclnn_atan2.h:65: * out_{i}=atan2(self_{i}, other_{i}) math/atan2/op_api/aclnn_atan2.h:48: A1[(Self)] --> B1([l0op::Contiguous]) --> C1([l0op::Cast]) --> D([l0op::Atan2]) math/atan2/op_api/aclnn_atan2.h:49: A2[(Other)] --> B2([l0op::Contiguous]) --> C2([l0op::Cast]) --> D([l0op::Atan2]) math/atan2/op_api/aclnn_atan2.cpp:151: auto kernelOut = l0op::Atan2(selfCast, otherCast, uniqueExecutor.get()); 另执行 ctest --test-dir math/atan2/tests -N,真实输出为: text Internal ctest changing into directory: /home/developer/inst/little_apple/cann-work/forks/little_apple/wt/ops-math-2026-10-04-002/math/atan2/tests Test project /home/developer/inst/little_apple/cann-work/forks/little_apple/wt/ops-math-2026-10-04-002/math/atan2/tests Total Tests: 0 当前 PR 只改文档/注释,当前环境未安装 CANN Toolkit,因此未声称运行编译或 NPU UT。 ## 文档更新 有。更新 math/atan2/docs/aclnnAtan2&aclnnInplaceAtan2.md 与 math/atan2/op_api/aclnn_atan2.h 的公式和流程图;无接口或实现代码更新。 ## 类型标签 - [x] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [x] 文档更新 - [ ] 其他,请描述: ### 当前PR是否有AI参与: [x] 是 __1. Agent平台信息: Codex CLI 0.153.4 __2. 模型信息: gpt-5.6-luna __3. Prompt摘要: 围绕已有 issue #3401 复现 aclnnAtan2 公式的象限语义缺失,对照 l0op::Atan2 实现完成最小文档修复,并进行逐 hunk 对账、静态回归和提交闸门核验。 ### 希望检视人员了解: 1. 人工参与说明:人工提供 issue #3401、候选证据、目标仓库/分支、环境信息和提交授权;代理在专用 worktree 独立复现旧公式与象限差异,逐项核对四处公式、流程图和 aclnn_atan2.cpp 调用,实施修复并实际运行静态回归、ctest -N 和 git diff --check。未运行 CANN 算子或 NPU 测试。 See merge request: cann/ops-math!6244 | 11 天前 | |
迁移增加atan2 Co-authored-by: Boyang_Zhang<zhangboyang15@h-partners.com> # message auto-generated for no-merge-commit merge: !2605 merge atan2_mig into master 迁移增加atan2 Created-by: BoyangZhang Commit-by: Boyang_Zhang Merged-by: cann-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> 迁移atan2算子至ops-math ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。--> <!-- 如果这个PR是为了解决特定的问题单,请在这里描述问题单单号。--> https://gitcode.com/cann/ops-math/issues/1681 ## 测试 <!--描述进行了哪些测试来验证你的改动。包括但不限于二级冒烟、算子泛化等。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-math!2605 | 4 个月前 | |
bincount等5个算子新增ascend350平台支持 Co-authored-by: Developer user<zhuzixian1@h-partners.com> # message auto-generated for no-merge-commit merge: !5585 merge ascend350_adapt_w2 into master bincount等5个算子新增ascend350平台支持 Created-by: zhuzixian-lr Commit-by: Developer user Merged-by: cann-robot Description: ## 描述 5个算子新增ascend350平台支持:bincount、range、adjacent_difference、dynamic_stitch、atan2。 修改模式(350与ascend950完全同配,两者同为 DAV_3510,走同一代码分支): - op_host/<op>_def.cpp:追加 AddConfig("ascend350"),复用 ascend950 同一 config 对象 - CMakeLists:SUPPORT_COMPUTE_UNIT/SUPPORT_TILING_DIR 增加 ascend350/arch35 - op_host/config/ascend350/:拷贝 ascend950 的 <op>_binary.json(dynamic_stitch 上游命名为 dynamic_stitch.json,维持原名) - scripts/kernel/binary_config/ascendc_config.json:仅对 json 中已有条目的算子修改(bincount/range/adjacent_difference 三条目 compute_units 加 ascend350,compile_options 与 ascend950 逐项相同);原无条目的算子(dynamic_stitch/atan2)不新增登记,避免影响默认编译选项行为 ## 测试 A5(Ascend950PR)环境实测: - bash build.sh --pkg --soc=ascend350 --ops=<op> --vendor_name=customize -j4 编译验证:5/5 算子通过(产物 .o、run 包产出、json 选项注入均验证;dynamic_stitch 用 --soc=ascend950 对照编译确认两侧产物同构) - pre-commit 全部检查通过(按文件运行,含 clang-format/codespell/OAT 合规) ## 关联的Issue https://gitcode.com/cann/ops-math/issues/3138 ## 类型标签 - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [ ] 文档更新 ## SocVersion 判断合规化 - 规则:不允许 SocVersion 区间判断隐式覆盖芯片,950/350 需显式 IsRegBase() 判断,不再依赖枚举顺序副作用 - 本 MR 涉及 1 处(math/atan2/op_api/aclnn_atan2.cpp GetDtypeSupportList,master 未覆盖,由本 MR 修改);bincount/range/adjacent_difference/dynamic_stitch 复查无区间判断违规(range 的等值判断链均已带 IsRegBase()) - 改法:保留原 [ASCEND910B, ASCEND910E] 区间(覆盖 910B/910C/910E),或逻辑增加 IsRegBase()(显式覆盖 regbase 芯片) - 行为零变化:950 原区间命中(true)→现 IsRegBase()(true);350 原被区间覆盖(true)→现 IsRegBase()(true);910B/C/E 走原区间不变 - 分支已 rebase 至最新 upstream master ## op_graph 层适配 - 全量排查两波算子目录 op_graph 层(融合 pass/graph_infer/plugin) - 🔴 修复 1 处:range/op_graph/range_graph_infer.cpp:37 DOUBLE 输入降级 FLOAT 判断 == "Ascend950" 增加 || == "Ascend350"(原 350 上 DOUBLE 输入输出 DOUBLE,kernel 不支持,与 950 行为分叉) See merge request: cann/ops-math!5585 | 1 个月前 | |
refactor: 将arch35算子kernel中MicroAPI接口统一迁移为Reg接口 Co-authored-by: tianqiguang<tianqiguang@huawei.com> # message auto-generated for no-merge-commit merge: !4187 merge master into master refactor: 将arch35算子kernel中MicroAPI接口统一迁移为Reg接口 Created-by: tianqiguang Commit-by: tianqiguang Merged-by: cann-robot Description: ## 描述 将 math 模块下 80+ 算子的 arch35 kernel 实现从 MicroAPI 接口迁移为 Reg(寄存器)接口,统一编程范式。 ### 改动范围 涉及算子: abs, abs_grad, add_n, adjacent_difference, arg_max_with_value, assign_add, assign_sub, atan2, bitwise_xor, cast, cdist, cdist_grad, ceil, complex_abs, cummin, cumsum, div, dot, exp, eye, floor, floor_div, floor_mod, fused_mul_add_n, grouped_bias_add_grad, inv, is_close, kth_value, lerp, lin_space, log, log1p, logical_or, mod, nan_to_num, neg, pow, power, reciprocal, reduce_all, reduce_any, reduce_log_sum_exp, reduce_nansum, reduce_prod, reduce_var, right_shift, rint, round, rsqrt, rsqrt_grad, sign, signbit, sinh, sort, sort_with_index, tanh, tanh_grad, tensor_equal, top_k_v2, trunc, truncate_div 等 ### 改动方式 - 将 MicroAPI 调用替换为等价 Reg API 调用 - 适配 arch35(ascend950)指令集特性 - 保持算子功能不变 ## 测试 - 涉及算子全量回归测试 ## 类型标签 - [x] 重构 ## 关联的Issue - #2295 See merge request: cann/ops-math!4187 | 3 个月前 | |
feat: atan2补充infershape和inferdtype实现、UT用例及输入dtype一致性校验 Co-authored-by: clinglai0517<laichangling@huawei.com> # message auto-generated for no-merge-commit merge: !4602 merge atan2-infershape into master feat: atan2补充infershape和inferdtype实现、UT用例及输入dtype一致性校验 Created-by: clinglai0517 Commit-by: clinglai0517 Merged-by: cann-robot Description: ## 描述 为math/atan2补充GE图层的shape与dtype推断: - 新增atan2_infershape.cpp,注册InferShape(x1、x2广播)和InferDataType(输出dtype取x1) - InferShape中校验x1、x2输入dtype一致,不一致返回GRAPH_FAILED;kernel不支持混合dtype, 类型提升语义由aclnn API层负责(PromoteType + Cast) - 新增op_host UT 11个用例,覆盖同shape、标量/一般广播、动态shape(-1)、未知rank(-2), 以及dtype推断(float/float16/bf16/混合输入) ## 关联的Issue Issue [#2613](https://gitcode.com/cann/ops-math/issues/2613) ## 测试 - op_host UT:11/11通过 - op_api UT:22/22通过,L2层混合dtype路径不受影响 ## 文档更新 不涉及文档修改 ## 类型标签 <!-- [x] 表示选中 --> - [x] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-math!4602 | 2 个月前 | |
bincount等5个算子新增ascend350平台支持 Co-authored-by: Developer user<zhuzixian1@h-partners.com> # message auto-generated for no-merge-commit merge: !5585 merge ascend350_adapt_w2 into master bincount等5个算子新增ascend350平台支持 Created-by: zhuzixian-lr Commit-by: Developer user Merged-by: cann-robot Description: ## 描述 5个算子新增ascend350平台支持:bincount、range、adjacent_difference、dynamic_stitch、atan2。 修改模式(350与ascend950完全同配,两者同为 DAV_3510,走同一代码分支): - op_host/<op>_def.cpp:追加 AddConfig("ascend350"),复用 ascend950 同一 config 对象 - CMakeLists:SUPPORT_COMPUTE_UNIT/SUPPORT_TILING_DIR 增加 ascend350/arch35 - op_host/config/ascend350/:拷贝 ascend950 的 <op>_binary.json(dynamic_stitch 上游命名为 dynamic_stitch.json,维持原名) - scripts/kernel/binary_config/ascendc_config.json:仅对 json 中已有条目的算子修改(bincount/range/adjacent_difference 三条目 compute_units 加 ascend350,compile_options 与 ascend950 逐项相同);原无条目的算子(dynamic_stitch/atan2)不新增登记,避免影响默认编译选项行为 ## 测试 A5(Ascend950PR)环境实测: - bash build.sh --pkg --soc=ascend350 --ops=<op> --vendor_name=customize -j4 编译验证:5/5 算子通过(产物 .o、run 包产出、json 选项注入均验证;dynamic_stitch 用 --soc=ascend950 对照编译确认两侧产物同构) - pre-commit 全部检查通过(按文件运行,含 clang-format/codespell/OAT 合规) ## 关联的Issue https://gitcode.com/cann/ops-math/issues/3138 ## 类型标签 - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [ ] 文档更新 ## SocVersion 判断合规化 - 规则:不允许 SocVersion 区间判断隐式覆盖芯片,950/350 需显式 IsRegBase() 判断,不再依赖枚举顺序副作用 - 本 MR 涉及 1 处(math/atan2/op_api/aclnn_atan2.cpp GetDtypeSupportList,master 未覆盖,由本 MR 修改);bincount/range/adjacent_difference/dynamic_stitch 复查无区间判断违规(range 的等值判断链均已带 IsRegBase()) - 改法:保留原 [ASCEND910B, ASCEND910E] 区间(覆盖 910B/910C/910E),或逻辑增加 IsRegBase()(显式覆盖 regbase 芯片) - 行为零变化:950 原区间命中(true)→现 IsRegBase()(true);350 原被区间覆盖(true)→现 IsRegBase()(true);910B/C/E 走原区间不变 - 分支已 rebase 至最新 upstream master ## op_graph 层适配 - 全量排查两波算子目录 op_graph 层(融合 pass/graph_infer/plugin) - 🔴 修复 1 处:range/op_graph/range_graph_infer.cpp:37 DOUBLE 输入降级 FLOAT 判断 == "Ascend950" 增加 || == "Ascend350"(原 350 上 DOUBLE 输入输出 DOUBLE,kernel 不支持,与 950 行为分叉) See merge request: cann/ops-math!5585 | 1 个月前 | |
doc Tools扫描错误修改 Co-authored-by: gitee-yanglulu<yanglulul@h-partners.com> # message auto-generated for no-merge-commit merge: !1899 merge master into master doc Tools扫描错误修改 Created-by: gitee-yanglulu Commit-by: gitee-yanglulu Merged-by: cann-robot Description: doc Tools扫描错误修改 See merge request: cann/ops-math!1899 | 6 个月前 |
Atan2
本目录仅包含Atan2算子对应的aclnn接口;如您想要贡献该算子的AscendC实现,请参考贡献流程。