| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
feat: 迁移 Conj 与 ConjugateTranspose AICPU 算子(含 infershape rt1→rt2) Co-authored-by: Ding_Jing<dingjing19@huawei.com> # message auto-generated for no-merge-commit merge: !3778 merge feat/migrate-conj-conjugate-transpose into master feat: 迁移 Conj 与 ConjugateTranspose AICPU 算子(含 infershape rt1→rt2) Created-by: Ding_Jing Commit-by: Ding_Jing Merged-by: cann-robot Description: ## 描述 从 canndev 迁移两个 AICPU 算子到 ops-math,并将 infershape 由 rt1 适配为 rt2: - Conj → math/conj/(逐元素复数共轭) - ConjugateTranspose → conversion/conjugate_transpose/(按 perm 转置 + 共轭) 每算子交付:op_graph(proto + InferDataType)、op_host(infershape rt2)、op_kernel_aicpu(kernel + opdef)、examples(图模式)、tests/ut(infershape + kernel)、README;docs/zh/op_list.md 补充条目。 infershape 适配要点: - Conj 为 element-wise,复用 Ops::Base::InferShape4Elewise。 - ConjugateTranspose 按 perm 常量重排 + InputsDataDependency({perm});perm 校验为非负 [0, rank-1],与本算子 AICPU kernel、canndev rt1、TF 语义一致(format 由框架接管,rt2 infershape 不处理)。 ## 关联的Issue #2135 https://gitcode.com/cann/ops-math/issues/2135 ## 测试 Ascend 910B 真机验证全部通过: - op_host(infershape)UT:8/8 - AICPU kernel UT:11/11(Conj 6 + ConjugateTranspose 5) - 打包 .run + 安装:SUCCESS;strings 自检两算子符号在 libmath_aicpu_kernels.so - 图模式 example:Conj、ConjugateTranspose 结果均正确,日志确认走 AICPU custom scheduler ## 文档更新 - 新增 math/conj/README.md、conversion/conjugate_transpose/README.md - 更新 docs/zh/op_list.md(新增两算子条目) ## 类型标签 - [x] 新特性 See merge request: cann/ops-math!3778 | 28 天前 | |
feat: 迁移 Conj 与 ConjugateTranspose AICPU 算子(含 infershape rt1→rt2) Co-authored-by: Ding_Jing<dingjing19@huawei.com> # message auto-generated for no-merge-commit merge: !3778 merge feat/migrate-conj-conjugate-transpose into master feat: 迁移 Conj 与 ConjugateTranspose AICPU 算子(含 infershape rt1→rt2) Created-by: Ding_Jing Commit-by: Ding_Jing Merged-by: cann-robot Description: ## 描述 从 canndev 迁移两个 AICPU 算子到 ops-math,并将 infershape 由 rt1 适配为 rt2: - Conj → math/conj/(逐元素复数共轭) - ConjugateTranspose → conversion/conjugate_transpose/(按 perm 转置 + 共轭) 每算子交付:op_graph(proto + InferDataType)、op_host(infershape rt2)、op_kernel_aicpu(kernel + opdef)、examples(图模式)、tests/ut(infershape + kernel)、README;docs/zh/op_list.md 补充条目。 infershape 适配要点: - Conj 为 element-wise,复用 Ops::Base::InferShape4Elewise。 - ConjugateTranspose 按 perm 常量重排 + InputsDataDependency({perm});perm 校验为非负 [0, rank-1],与本算子 AICPU kernel、canndev rt1、TF 语义一致(format 由框架接管,rt2 infershape 不处理)。 ## 关联的Issue #2135 https://gitcode.com/cann/ops-math/issues/2135 ## 测试 Ascend 910B 真机验证全部通过: - op_host(infershape)UT:8/8 - AICPU kernel UT:11/11(Conj 6 + ConjugateTranspose 5) - 打包 .run + 安装:SUCCESS;strings 自检两算子符号在 libmath_aicpu_kernels.so - 图模式 example:Conj、ConjugateTranspose 结果均正确,日志确认走 AICPU custom scheduler ## 文档更新 - 新增 math/conj/README.md、conversion/conjugate_transpose/README.md - 更新 docs/zh/op_list.md(新增两算子条目) ## 类型标签 - [x] 新特性 See merge request: cann/ops-math!3778 | 28 天前 | |
feat: 迁移 Conj 与 ConjugateTranspose AICPU 算子(含 infershape rt1→rt2) Co-authored-by: Ding_Jing<dingjing19@huawei.com> # message auto-generated for no-merge-commit merge: !3778 merge feat/migrate-conj-conjugate-transpose into master feat: 迁移 Conj 与 ConjugateTranspose AICPU 算子(含 infershape rt1→rt2) Created-by: Ding_Jing Commit-by: Ding_Jing Merged-by: cann-robot Description: ## 描述 从 canndev 迁移两个 AICPU 算子到 ops-math,并将 infershape 由 rt1 适配为 rt2: - Conj → math/conj/(逐元素复数共轭) - ConjugateTranspose → conversion/conjugate_transpose/(按 perm 转置 + 共轭) 每算子交付:op_graph(proto + InferDataType)、op_host(infershape rt2)、op_kernel_aicpu(kernel + opdef)、examples(图模式)、tests/ut(infershape + kernel)、README;docs/zh/op_list.md 补充条目。 infershape 适配要点: - Conj 为 element-wise,复用 Ops::Base::InferShape4Elewise。 - ConjugateTranspose 按 perm 常量重排 + InputsDataDependency({perm});perm 校验为非负 [0, rank-1],与本算子 AICPU kernel、canndev rt1、TF 语义一致(format 由框架接管,rt2 infershape 不处理)。 ## 关联的Issue #2135 https://gitcode.com/cann/ops-math/issues/2135 ## 测试 Ascend 910B 真机验证全部通过: - op_host(infershape)UT:8/8 - AICPU kernel UT:11/11(Conj 6 + ConjugateTranspose 5) - 打包 .run + 安装:SUCCESS;strings 自检两算子符号在 libmath_aicpu_kernels.so - 图模式 example:Conj、ConjugateTranspose 结果均正确,日志确认走 AICPU custom scheduler ## 文档更新 - 新增 math/conj/README.md、conversion/conjugate_transpose/README.md - 更新 docs/zh/op_list.md(新增两算子条目) ## 类型标签 - [x] 新特性 See merge request: cann/ops-math!3778 | 28 天前 | |
fix: 修正 ConjugateTranspose AICPU opsFlag 为 OPS_FLAG_CLOSE Co-authored-by: Ding_Jing<dingjing19@huawei.com> # message auto-generated for no-merge-commit merge: !3969 merge fix/conjugate-transpose-opsflag-close into master fix: 修正 ConjugateTranspose AICPU opsFlag 为 OPS_FLAG_CLOSE Created-by: Ding_Jing Commit-by: Ding_Jing Merged-by: cann-robot Description: ## 描述 修改开源仓ConjugateTranspose 算子信息库字段使其和AICPU 算子信息库字段 opInfo.opsFlag 保持一致。 本 PR 删除 conversion/conjugate_transpose/op_kernel_aicpu/conjugate_transpose_aicpu_def.cpp 中的显式覆盖行 this->AICPU().ExtendCfgInfo(OP_INFO_OPS_FLAG.c_str(), OPEN_OPS_FLAG.c_str());,回退到 ApplyMathAicpuDefaultCfg 默认的 OPS_FLAG_CLOSE: - 与 canndev 源算子信息库保持一致(ConjugateTranspose = CLOSE); - 符合仓内惯例:需要 CLOSE 的算子均依赖默认配置、无一显式写 CLOSE_OPS_FLAG,仅需要 OPEN 时才显式覆盖; - Conj 算子维持 OPS_FLAG_OPEN 不变,不受影响。 改动范围:1 file changed, 1 deletion(-)。 ## 关联的Issue 无(本次为迁移遗留字段的修正,按约定不关联/不新建 Issue)。 ## 测试 在 Ascend 910B3 真机完成端到端验证: - **AICPU kernel UT**:5/5 通过(math_aicpu_op_kernel_ut); - **打包产物复核**:build/autogen/aicpu_kernel.ini 中 [ConjugateTranspose] opInfo.opsFlag=OPS_FLAG_CLOSE、[Conj] opInfo.opsFlag=OPS_FLAG_OPEN,确认改动已进入算子信息库; - **图模式 example**:安装含改动的自定义包后运行 geir graph example,2×3 复数共轭转置输出 3×2 结果正确,日志确认仍走 aicpu_custom_scheduler(op type [ConjugateTranspose] run cpu kernel finished, run time ~42us),验证 CLOSE 不影响算子在图模式下的调度执行; - **静态检查**:pre-commit(clang-format / codespell / OAT 等)全部通过,远端 git hooks PASSED。 ## 文档更新 无。 ## 类型标签 - [x] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-math!3969 | 28 天前 | |
feat: 迁移 Conj 与 ConjugateTranspose AICPU 算子(含 infershape rt1→rt2) Co-authored-by: Ding_Jing<dingjing19@huawei.com> # message auto-generated for no-merge-commit merge: !3778 merge feat/migrate-conj-conjugate-transpose into master feat: 迁移 Conj 与 ConjugateTranspose AICPU 算子(含 infershape rt1→rt2) Created-by: Ding_Jing Commit-by: Ding_Jing Merged-by: cann-robot Description: ## 描述 从 canndev 迁移两个 AICPU 算子到 ops-math,并将 infershape 由 rt1 适配为 rt2: - Conj → math/conj/(逐元素复数共轭) - ConjugateTranspose → conversion/conjugate_transpose/(按 perm 转置 + 共轭) 每算子交付:op_graph(proto + InferDataType)、op_host(infershape rt2)、op_kernel_aicpu(kernel + opdef)、examples(图模式)、tests/ut(infershape + kernel)、README;docs/zh/op_list.md 补充条目。 infershape 适配要点: - Conj 为 element-wise,复用 Ops::Base::InferShape4Elewise。 - ConjugateTranspose 按 perm 常量重排 + InputsDataDependency({perm});perm 校验为非负 [0, rank-1],与本算子 AICPU kernel、canndev rt1、TF 语义一致(format 由框架接管,rt2 infershape 不处理)。 ## 关联的Issue #2135 https://gitcode.com/cann/ops-math/issues/2135 ## 测试 Ascend 910B 真机验证全部通过: - op_host(infershape)UT:8/8 - AICPU kernel UT:11/11(Conj 6 + ConjugateTranspose 5) - 打包 .run + 安装:SUCCESS;strings 自检两算子符号在 libmath_aicpu_kernels.so - 图模式 example:Conj、ConjugateTranspose 结果均正确,日志确认走 AICPU custom scheduler ## 文档更新 - 新增 math/conj/README.md、conversion/conjugate_transpose/README.md - 更新 docs/zh/op_list.md(新增两算子条目) ## 类型标签 - [x] 新特性 See merge request: cann/ops-math!3778 | 28 天前 | |
feat: 迁移 Conj 与 ConjugateTranspose AICPU 算子(含 infershape rt1→rt2) Co-authored-by: Ding_Jing<dingjing19@huawei.com> # message auto-generated for no-merge-commit merge: !3778 merge feat/migrate-conj-conjugate-transpose into master feat: 迁移 Conj 与 ConjugateTranspose AICPU 算子(含 infershape rt1→rt2) Created-by: Ding_Jing Commit-by: Ding_Jing Merged-by: cann-robot Description: ## 描述 从 canndev 迁移两个 AICPU 算子到 ops-math,并将 infershape 由 rt1 适配为 rt2: - Conj → math/conj/(逐元素复数共轭) - ConjugateTranspose → conversion/conjugate_transpose/(按 perm 转置 + 共轭) 每算子交付:op_graph(proto + InferDataType)、op_host(infershape rt2)、op_kernel_aicpu(kernel + opdef)、examples(图模式)、tests/ut(infershape + kernel)、README;docs/zh/op_list.md 补充条目。 infershape 适配要点: - Conj 为 element-wise,复用 Ops::Base::InferShape4Elewise。 - ConjugateTranspose 按 perm 常量重排 + InputsDataDependency({perm});perm 校验为非负 [0, rank-1],与本算子 AICPU kernel、canndev rt1、TF 语义一致(format 由框架接管,rt2 infershape 不处理)。 ## 关联的Issue #2135 https://gitcode.com/cann/ops-math/issues/2135 ## 测试 Ascend 910B 真机验证全部通过: - op_host(infershape)UT:8/8 - AICPU kernel UT:11/11(Conj 6 + ConjugateTranspose 5) - 打包 .run + 安装:SUCCESS;strings 自检两算子符号在 libmath_aicpu_kernels.so - 图模式 example:Conj、ConjugateTranspose 结果均正确,日志确认走 AICPU custom scheduler ## 文档更新 - 新增 math/conj/README.md、conversion/conjugate_transpose/README.md - 更新 docs/zh/op_list.md(新增两算子条目) ## 类型标签 - [x] 新特性 See merge request: cann/ops-math!3778 | 28 天前 | |
feat: 迁移 Conj 与 ConjugateTranspose AICPU 算子(含 infershape rt1→rt2) Co-authored-by: Ding_Jing<dingjing19@huawei.com> # message auto-generated for no-merge-commit merge: !3778 merge feat/migrate-conj-conjugate-transpose into master feat: 迁移 Conj 与 ConjugateTranspose AICPU 算子(含 infershape rt1→rt2) Created-by: Ding_Jing Commit-by: Ding_Jing Merged-by: cann-robot Description: ## 描述 从 canndev 迁移两个 AICPU 算子到 ops-math,并将 infershape 由 rt1 适配为 rt2: - Conj → math/conj/(逐元素复数共轭) - ConjugateTranspose → conversion/conjugate_transpose/(按 perm 转置 + 共轭) 每算子交付:op_graph(proto + InferDataType)、op_host(infershape rt2)、op_kernel_aicpu(kernel + opdef)、examples(图模式)、tests/ut(infershape + kernel)、README;docs/zh/op_list.md 补充条目。 infershape 适配要点: - Conj 为 element-wise,复用 Ops::Base::InferShape4Elewise。 - ConjugateTranspose 按 perm 常量重排 + InputsDataDependency({perm});perm 校验为非负 [0, rank-1],与本算子 AICPU kernel、canndev rt1、TF 语义一致(format 由框架接管,rt2 infershape 不处理)。 ## 关联的Issue #2135 https://gitcode.com/cann/ops-math/issues/2135 ## 测试 Ascend 910B 真机验证全部通过: - op_host(infershape)UT:8/8 - AICPU kernel UT:11/11(Conj 6 + ConjugateTranspose 5) - 打包 .run + 安装:SUCCESS;strings 自检两算子符号在 libmath_aicpu_kernels.so - 图模式 example:Conj、ConjugateTranspose 结果均正确,日志确认走 AICPU custom scheduler ## 文档更新 - 新增 math/conj/README.md、conversion/conjugate_transpose/README.md - 更新 docs/zh/op_list.md(新增两算子条目) ## 类型标签 - [x] 新特性 See merge request: cann/ops-math!3778 | 28 天前 |
ConjugateTranspose
产品支持情况
| 产品 | 是否支持 |
|---|---|
| Ascend 950PR/Ascend 950DT | √ |
| Atlas A3 训练系列产品/Atlas A3 推理系列产品 | √ |
| Atlas A2 训练系列产品/Atlas A2 推理系列产品 | √ |
| Atlas 200I/500 A2 推理产品 | × |
| Atlas 推理系列产品 | √ |
| Atlas 训练系列产品 | √ |
功能说明
-
算子功能:按perm指定的维度顺序对输入x做转置,并对结果取共轭。对实数类型,共轭等价于恒等,等价于普通Transpose。
-
计算公式:y = conj(transpose(x, perm)),其中y的第i维大小为x的第perm[i]维大小。
参数说明
| 参数名 | 输入/输出/属性 | 描述 | 数据类型 | 数据格式 |
|---|---|---|---|---|
| x | 输入 | 待转置的输入张量,维度需大于1。 | COMPLEX64、COMPLEX128、FLOAT16、FLOAT、DOUBLE、BOOL、INT8、INT16、INT32、INT64、UINT8、UINT16、UINT32、UINT64 | ND |
| perm | 输入 | 1-D张量,描述维度置换顺序,元素个数等于x的维数。 | INT32、INT64 | ND |
| y | 输出 | 转置并取共轭后的张量,类型与x一致。 | 与x相同 | ND |
约束说明
- x的维数需大于1,且不超过7维。
- perm必须为1-D,元素个数等于x的维数,取值为x各维度的一个排列。
调用说明
| 调用方式 | 样例代码 | 说明 |
|---|---|---|
| 图模式调用 | test_geir_conjugate_transpose | 通过算子IR构图方式调用conjugate_transpose算子。 |