文件最后提交记录最后更新时间
MhcSinkHorn 资料修改 Co-authored-by: qq_52056150<wangshuo179@huawei.com> # message auto-generated for no-merge-commit merge: !4975 merge MhcSinkHorn-资料修改 into master MhcSinkHorn 资料修改 Created-by: qq_52056150 Commit-by: qq_52056150 Merged-by: cann-robot Description: ## 描述 MhcSinkHorn 资料修改 ## 关联的Issue https://gitcode.com/cann/ops-transformer/issues/2269 ## 测试 不涉及 ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] 🐛 Bug 修复 - [ ] ✨ 新特性 - [ ] ⚡ 性能优化 - [ ] ♻️ 重构 - [ ] 🧪 测试 - [ ] 📦 构建/CI - [ ] 🔧 配置变更 - [x] 📝 文档更新 - [ ] ⬆️ 依赖升级 - [ ] 🔒 安全修复 - [ ] 🧹 代码清理 - [ ] ❓ 其他,请描述: See merge request: cann/ops-transformer!497526 天前
MhcSinkHorn 功能问题修复--修复infershape错误把动态标签识别为真实值的问题 Co-authored-by: qq_52056150<wangshuo179@huawei.com> # message auto-generated for no-merge-commit merge: !5142 merge MhcSinkHorn-功能问题修复 into master MhcSinkHorn 功能问题修复--修复infershape错误把动态标签识别为真实值的问题 Created-by: qq_52056150 Commit-by: qq_52056150 Merged-by: cann-robot Description: ## 描述 修复 MhcSinkhorn 在动态 shape 场景下将 '-1'动态维当作真实维度参与 'n0 == n1' 校验,导致 含-1的用例被误判失败的问题。修改后仅在'n0'、'n1'都为静态已知维度时校验相等,并在一侧为动态维时尽量用另一侧静态维推导输出 shape,不影响原有静态 shape 行为。 ## 关联的Issue https://gitcode.com/cann/ops-transformer/issues/2367 ## 测试 本地用例批跑已经验证通过,二级冒烟、算子OBP冒烟均无异常 ## 文档更新 不涉及 ## 类型标签 <!-- [x] 表示选中 --> - [x] 🐛 Bug 修复 - [ ] ✨ 新特性 - [ ] ⚡ 性能优化 - [ ] ♻️ 重构 - [ ] 🧪 测试 - [ ] 📦 构建/CI - [ ] 🔧 配置变更 - [ ] 📝 文档更新 - [ ] ⬆️ 依赖升级 - [ ] 🔒 安全修复 - [ ] 🧹 代码清理 - [ ] ❓ 其他,请描述: See merge request: cann/ops-transformer!514219 天前
新增支持MhcSinkhorn算子 Co-authored-by: 胡文澳<huwenao@huawei.com> # message auto-generated for no-merge-commit merge: !2361 merge mhc_sinkhorn into master 新增支持MhcSinkhorn算子 Created-by: hhuwenao Commit-by: 胡文澳 Merged-by: cann-robot Description: ## 描述 新增支持MhcSinkhorn算子 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> ## 关联的Issue 关联Issue [#1182](https://gitcode.com/cann/ops-transformer/issues/1182) <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。例如:关联Issue #000--> <!-- 如果这个PR是为了解决特定的问题单,请在这里描述问题单单号。--> ## 测试 进行的验证包括: - [x] 二级冒烟 - [x] 算子白盒用例 - [x] 算子泛化用例 - [x] aclnn用例 <!--描述进行了哪些测试来验证你的改动。包括但不限于二级冒烟、算子泛化等。--> ## 文档更新 更新了docs/zh/op_list.md、docs/zh/op_list.md文件,新增mhc/mhc_sinkhorn/README.md、mhc/mhc_sinkhorn/docs/aclnnMhcSinkhorn.md文件。 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [x] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-transformer!23612 个月前
mhc_sinkhorn_backward perf optimization Co-authored-by: liuxiao222<liuxiao222@huawei.com> # message auto-generated for no-merge-commit merge: !5377 merge master into master mhc_sinkhorn_backward perf optimization Created-by: liuxiao222 Commit-by: liuxiao222 Merged-by: cann-robot Description: ## 描述 1.公共计算逻辑外提,减少vec计算 1.优化broadcast的写法,消除循环中的同步阻塞,提高指令并行度 ## 关联的Issue 关联issue:https://gitcode.com/cann/ops-transformer/issues/2467 ## 测试 批跑白盒用例,网络用例 精度pss,性能达标 ## 文档更新 不涉及 ## 类型标签 <!-- [x] 表示选中 --> - [ ] 🐛 Bug 修复 - [ ] ✨ 新特性 - [x] ⚡ 性能优化 - [ ] ♻️ 重构 - [x] 🧪 测试 - [ ] 📦 构建/CI - [ ] 🔧 配置变更 - [ ] 📝 文档更新 - [ ] ⬆️ 依赖升级 - [ ] 🔒 安全修复 - [ ] 🧹 代码清理 - [ ] ❓ 其他,请描述: See merge request: cann/ops-transformer!537717 天前
modify mhcSinkHorn tiling and infershape Co-authored-by: fengjiawei1<fengjiawei5@huawei.com> # message auto-generated for no-merge-commit merge: !4434 merge mhc_fd_ca into master modify mhcSinkHorn tiling and infershape Created-by: fengjiawei1 Commit-by: fengjiawei1 Merged-by: cann-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> 增加mhcSinkHorn训练场景infershape和tiling适配 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。例如:关联Issue #000--> <!-- 如果这个PR是为了解决特定的问题单,请在这里描述问题单单号。--> https://gitcode.com/cann/ops-transformer/issues/2063 ## 测试 <!--描述进行了哪些测试来验证你的改动。包括但不限于二级冒烟、算子泛化等。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] 🐛 Bug 修复 - [x] ✨ 新特性 - [ ] ⚡ 性能优化 - [ ] ♻️ 重构 - [ ] 🧪 测试 - [ ] 📦 构建/CI - [ ] 🔧 配置变更 - [ ] 📝 文档更新 - [ ] ⬆️ 依赖升级 - [ ] 🔒 安全修复 - [ ] 🧹 代码清理 - [ ] ❓ 其他,请描述: See merge request: cann/ops-transformer!44341 个月前
fix: skip failing operator UT builds by commenting out error test CMakeLists.txt Co-authored-by: huang-chuhong<huangchuhong1@h-partners.com> # message auto-generated for no-merge-commit merge: !5823 merge fix/ut-build-skip-failing-ops into master fix: skip failing operator UT builds by commenting out error test CMakeLists.txt Created-by: huang-chuhong Commit-by: huang-chuhong Merged-by: cann-robot Description: ## 描述 部分算子 UT 在 ascend910b 平台上编译失败,导致整体 UT 构建阻塞。本 PR 通过注释失败算子的 tests CMakeLists.txt 代码部分(保留版权头),使 op_host/op_api UT 构建能顺利通过。 ## 改动 - build.sh: 在 set_ut_mode() 中新增逻辑,当 UT_TEST_ALL=TRUE 且 ENABLE_BUILT_CUSTOM!=TRUE 时自动拆分为 OP_HOST_UT + OP_API_UT + OP_GRAPH_UT,关闭 OP_KERNEL_UT - 注释以下算子的 tests CMakeLists.txt(保留版权头): - ffn/ffn, attention/fused_floyd_attention_grad, attention/lightning_indexer_grad, attention/nsa_compress_attention, attention/nsa_compress_attention_infer, attention/nsa_compress_with_cache, attention/nsa_selected_attention, attention/nsa_selected_attention_infer, gmm/quant_grouped_matmul_dequant, mc2/matmul_all_reduce, mhc/mhc_pre_sinkhorn, mhc/mhc_sinkhorn, moe/moe_gating_top_k_softmax_v2, posembedding/norm_rope_concat ## 关联的Issue https://gitcode.com/cann/ops-transformer/issues/2622 https://gitcode.com/cann/ops-transformer/issues/2594 ## 测试 - bash build.sh -u: 1198 tests, 1197 passed, 1 skipped - bash build.sh -u --ophost: 2904 tests, all passed - bash build.sh -u --opapi: 1198 tests, 1197 passed, 1 skipped ## 类型标签 - [x] 🧪 测试 - [x] 📦 构建/CI See merge request: cann/ops-transformer!582310 天前
新增支持MhcSinkhorn算子 Co-authored-by: 胡文澳<huwenao@huawei.com> # message auto-generated for no-merge-commit merge: !2361 merge mhc_sinkhorn into master 新增支持MhcSinkhorn算子 Created-by: hhuwenao Commit-by: 胡文澳 Merged-by: cann-robot Description: ## 描述 新增支持MhcSinkhorn算子 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> ## 关联的Issue 关联Issue [#1182](https://gitcode.com/cann/ops-transformer/issues/1182) <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。例如:关联Issue #000--> <!-- 如果这个PR是为了解决特定的问题单,请在这里描述问题单单号。--> ## 测试 进行的验证包括: - [x] 二级冒烟 - [x] 算子白盒用例 - [x] 算子泛化用例 - [x] aclnn用例 <!--描述进行了哪些测试来验证你的改动。包括但不限于二级冒烟、算子泛化等。--> ## 文档更新 更新了docs/zh/op_list.md、docs/zh/op_list.md文件,新增mhc/mhc_sinkhorn/README.md、mhc/mhc_sinkhorn/docs/aclnnMhcSinkhorn.md文件。 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [x] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-transformer!23612 个月前
doc Tools工具扫描问题修改 Co-authored-by: gitee-yanglulu<yanglulul@h-partners.com> # message auto-generated for no-merge-commit merge: !3432 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-transformer!34322 个月前
README.md

MhcSinkhorn

 ## 产品支持情况
 
 |产品      | 是否支持 |
 |:----------------------------|:-----------:|
 |<term>Ascend 950PR/Ascend 950DT</term>|      √     |
 |<term>Atlas A3 训练系列产品/Atlas A3 推理系列产品</term>|      ×     |
 |<term>Atlas A2 训练系列产品/Atlas A2 推理系列产品</term>|      ×     |
 |<term>Atlas 200I/500 A2 推理产品</term>|      ×     |
 |<term>Atlas 推理系列产品</term>|      ×     |
 |<term>Atlas 训练系列产品</term>|      ×     |
 
 ## 功能说明
 
 - 算子功能:MhcSinkhorn是mHC架构的核心算子,通过Sinkhorn-Knopp迭代算法将mHC层初始混合矩阵投影到双随机矩阵流形(Birkhoff多胞形),生成满足行和、列和均为1的双随机矩阵h_res,为MhcPost算子提供关键输入,稳定深度网络信号传播、解决梯度消失/爆炸问题。
 
 - 计算公式:
 
   $$
   \begin{align}
   M^{(k+1)} &= M^{(k)} \oslash (1_n \cdot (M^{(k)})^T 1_n) \\
   M^{(k+2)} &= M^{(k+1)} \oslash ((M^{(k+1)} 1_n) \cdot 1_n^T) \\
   h_{res} &= M^{(k+2)}
   \end{align}
   $$
   其中:$M$ 为初始混合矩阵,$\oslash$ 为元素级除法,$1_n$ 为n维全1向量,$k$ 为迭代次数,迭代至矩阵满足双随机特性时停止。
 
 ## 参数说明
 
   <table style="undefined; table-layout: fixed; width: 952px"><colgroup>
   <col style="width: 106px">
   <col style="width: 87px">
   <col style="width: 445px">
   <col style="width: 209px">
   <col style="width: 105px">
   </colgroup>
   <thead>
     <tr>
       <th>参数名</th>
       <th>输入/输出</th>
       <th>描述</th>
       <th>数据类型</th>
       <th>数据格式</th>
     </tr></thead>
   <tbody>
     <tr>
       <td>init_matrix</td>
       <td>输入</td>
       <td>待变换的mHC层初始混合矩阵,为超连接原始矩阵。</td>
       <td>FLOAT32</td>
       <td>ND</td>
     </tr>
     <tr>
       <td>max_iter</td>
       <td>输入</td>
       <td>Sinkhorn-Knopp迭代最大次数,控制迭代收敛过程。</td>
       <td>INT32</td>
       <td>标量</td>
     </tr>
     <tr>
       <td>epsilon</td>
       <td>输入</td>
       <td>收敛阈值,矩阵行/列和与1的误差小于该值时停止迭代。</td>
       <td>FLOAT32</td>
       <td>标量</td>
     </tr>
     <tr>
       <td>h_res</td>
       <td>输出</td>
       <td>经Sinkhorn变换后的双随机矩阵,作为MhcPost算子的h_res输入。</td>
       <td>FLOAT32</td>
       <td>ND</td>
     </tr>
   </tbody>
   </table>
 
 ## 约束说明
 
 - 输入init_matrix需为二维非负矩阵(N×N),确保迭代后可形成双随机矩阵。
 - max_iter建议取值范围50~200,epsilon建议取值范围1e-6~1e-4,平衡收敛效果与计算效率。
 - 仅支持Ascend 950PR/Ascend 950DT硬件环境,其他Atlas系列产品暂不支持。
 
 ## 调用说明
 
 | 调用方式      | 调用样例                 | 说明                                                         |
 |--------------|-------------------------|--------------------------------------------------------------|
 | aclnn调用 | [test_aclnn_mhc_sinkhorn](examples/test_aclnn_mhc_sinkhorn.cpp) | 通过接口方式调用[aclnnMhcSinkhorn](docs/aclnnMhcSinkhorn.md)算子,输出的h_res可直接传入MhcPost算子完成残差连接计算。 |