| Files | Last commit | Last update |
|---|---|---|
fix(pre-commit): 全仓代码规范整改——公共 Co-authored-by: gitcode_lijd<lijiandong20@huawei.com> # message auto-generated for no-merge-commit merge: !13532 merge common into master fix(pre-commit): 全仓代码规范整改——公共 Created-by: gitcode_lijd Commit-by: gitcode_lijd Merged-by: cann-robot Description: 关联Issue https://gitcode.com/cann/ops-transformer/issues/5939 ## 描述 全仓代码规范整改系列——公共目录(common/、examples/、tests/、scripts/ 等)。基于仓库 pre-commit 门禁对存量代码做一次性规范收敛: - clang-format 按 .clang-format 统一格式(列宽 120、指针左对齐等),ruff 格式化 Python - 行尾空白、文件末尾换行修复,少量文档笔误修正 - 规模:280 个文件,+4708/-5785 行,纯格式化改动语义等价,无逻辑变更 ## 关联的Issue https://gitcode.com/cann/ops-transformer/issues/5939(全仓整改总跟踪) ## 测试 - pre-commit 全部钩子本地通过 - CI 流水线(compile/UT)验证 See merge request: cann/ops-transformer!13532 | 1 month ago | |
支持 cannbotdsl 算子的构建、二进制交付与独立运行 Co-authored-by: sky-zyh<zhangyuhan45@huawei.com> # message auto-generated for no-merge-commit merge: !14917 merge pr14779-framework-mqsmla-only into master 支持 cannbotdsl 算子的构建、二进制交付与独立运行 Created-by: sky-zyh Commit-by: sky-zyh Merged-by: cann-robot Description: 为 cannbotdsl 算子提供 Transformer 构建框架接入,沿用仓内 OBJECT target 的对象收集方式,将 Native Host 和 ACLNN API 汇入既有 builtin/custom 产物。设备资源复用原扫描、索引和安装流程,DSL Python 源码随 Torch Extension wheel 发布。 See merge request: cann/ops-transformer!14917 | 11 days ago | |
ci(compile): 编译范围推导支持暂缓编译条目(impact空=自身与闭包均不编),common/3rd 暂不触发下游 Co-authored-by: gitcode_lijd<lijiandong20@huawei.com> # message auto-generated for no-merge-commit merge: !13631 merge moonep_4 into master ci(compile): 编译范围推导支持暂缓编译条目(impact空=自身与闭包均不编),common/3rd 暂不触发下游 Created-by: gitcode_lijd Commit-by: gitcode_lijd Merged-by: cann-robot Description: 关联Issue https://gitcode.com/cann/ops-transformer/issues/5732(编译范围推导机制,前置 PR https://gitcode.com/cann/ops-transformer/pull/13100) ## 描述 --PR_COMPILE 编译范围推导(cmake/scripts/parse_compile_scope.py)机制扩展,并在 tests/compile_scope_whitelist.yaml 登记 3 条暂缓编译条目。 ### 1. 暂缓编译条目(impact 为空) 白名单条目 impact: [] 语义为"暂缓编译": - 直接改动该算子:不进入编译清单; - 其他算子变更:depends 反向闭包同样不附带该算子(新增 suppressed 集合,从闭包结果中剔除)。 本次登记 3 条(owner 要求暂缓编译,恢复时删除对应条目即可): - attention/fused_infer_attention_score(soc: ascend910b/910_93/mc62/950/960dt) - mc2/mega_moe(soc: ascend950/910_93/910b) - mc2/matmul_all_reduce(soc: ascend950/910b/310p) ### 2. common/3rd 暂不触发下游 域内 common/3rd 共享键变更暂不触发下游编译(当前仅验证算子间互相触发,后续恢复)。 ### 3. 边界 - 暂缓条目仅影响 kernel 编译范围,UT 不受影响; - experimental 变体与主线同 key,同样被暂缓条目覆盖。 ## 测试 - pre-commit 全绿(含 compile-scope-whitelist-check,21 entries); - 推导用例:3 个暂缓算子直接变更 @950/@910b → 空清单(build.sh exit 200 跳过);mc2/common 变更 → 空清单;attention/prompt_flash_attention 变更 @910b → 闭包含 incre_flash_attention、不含 fused_infer_attention_score(暂缓生效);flash_attn 白名单条目不受影响(@950 → flash_attn)。 See merge request: cann/ops-transformer!13631 | 26 days ago | |
feat(mc2): 补齐责任田/UT SOC配置并新增文件覆盖率豁免名单 Co-authored-by: mutex_lock<chenyifan66@h-partners.com> # message auto-generated for no-merge-commit merge: !14317 merge ut_cov into master feat(mc2): 补齐责任田/UT SOC配置并新增文件覆盖率豁免名单 Created-by: mutex_lock Commit-by: mutex_lock Merged-by: cann-robot Description: ## 描述 补齐 mc2 算子看板责任田与 UT SOC 看护,并新增文件覆盖率豁免名单,支撑看板文件覆盖率统计与 CI 按变更触发正确芯片 UT。 ### 1. 责任田(classify_rule.yaml)本次补齐 相对补齐前,以下算子**新写入**责任田(✓ 表示本次写入该组): | 算子 | mc2_training | mc2_moe | mc2_moe_advanced | mc2_inference | |------|:------------:|:-------:|:----------------:|:-------------:| | allto_all_matmul_v2 | ✓ | | | | | all_gather_matmul_v3 | ✓ | | | ✓ | | matmul_all_reduce_add_rms_norm | ✓ | | | ✓ | | inplace_matmul_all_reduce_add_rms_norm | ✓ | | | ✓ | | attention_to_ffn_v2 | | | | ✓ | | ffn_to_attention_v2 | | | | ✓ | 补齐后:磁盘全部 **47** 个 mc2 算子均已在责任田中(含 tools / moe_ep_* / engram_* 等既有条目)。 ### 2. UT SOC(test_soc_config.yaml)本次补齐 / 重铺 **划分规则**(参考 quant_grouped_mat_mul_allto_allv): 1. 优先 op_host/op_tiling:arch35→ascend950,arch22→ascend910b,两边都有→两边都挂 2. 无 tiling arch:回退 op_kernel/arch22|arch35 3. 仍无:回退 op_host/config/<soc>/(ascend910_93 折叠进 ascend910b) 4. 写 mc2/<op>/op_host,若存在再写 tests/ut/op_host **本次新进入 SOC 的算子及对应芯片:** | 算子 | ascend310p | ascend910b | ascend950 | 判定依据(摘要) | |------|:----------:|:----------:|:---------:|------------------| | all_gather_matmul_v3 | | | ✓ | tiling arch35 | | allto_all_matmul_v2 | | | ✓ | tiling arch35 | | quant_grouped_mat_mul_allto_allv | | | ✓ | tiling arch35 | | distribute_barrier_extend | | | ✓ | kernel arch35 | | engram_fetch | | | ✓ | tiling arch35 | | engram_fetch_grad | | | ✓ | tiling arch35 | | engram_fetch_wait | | | ✓ | tiling arch35(暂无 UT) | | moe_distribute_combine_v3 | | ✓ | ✓ | tiling arch22+arch35 | | moe_distribute_dispatch_v3 | | ✓ | ✓ | tiling arch22+arch35 | | attention_to_ffn_v2 | | | ✓ | kernel arch35 | | ffn_to_attention_v2 | | | ✓ | kernel arch35 | **责任田本次补齐、但 SOC 此前已有映射的算子:** | 算子 | 责任田 | 当前 SOC | |------|--------|----------| | matmul_all_reduce_add_rms_norm | training + inference | ascend910b | | inplace_matmul_all_reduce_add_rms_norm | training + inference | ascend910b | **按规则重铺后,SOC 归属调整的既有算子:** | 算子 | 调整前 | 调整后 | |------|--------|--------| | all_gather_matmul | 910b | 910b + 950 | | distribute_barrier | 910b | 910b + 950 | | matmul_reduce_scatter | 910b | 910b + 950 | | moe_distribute_combine_setup / teardown | 950 | 910b + 950 | | moe_distribute_dispatch_setup / teardown | 950 | 910b + 950 | | quant_all_reduce | 910b + 950 | 950 | | quant_reduce_scatter | 910b + 950 | 950 | **未挂 SOC**(无 UT,且无 arch/config 可判定):moe_ep_combine / _epilogue、moe_ep_dispatch / _epilogue、tools。 覆盖汇总:ascend310p **1**、ascend910b **30**、ascend950 **35**;有 UT 的 mc2 算子均已进 SOC。 ### 3. 文件覆盖率豁免(tests/file_cov_exempt.yaml 新增) 按组件配置:dirs 豁免 op_kernel / op_graph,files 豁免纯声明/数据类型头。 仅影响看板文件覆盖率分母;未命中才豁免,命中优先并 WARN。 组件:mc2_training / mc2_moe / mc2_moe_advanced。 ## 关联的Issue https://gitcode.com/cann/ops-transformer/issues/6725 ## 测试 - 对照磁盘算子清单:classify_rule 47/47;有 UT 算子均在 test_soc_config 中。 - 本地验证文件覆盖率豁免(coverage.info + tianti): - mc2_training:138/146 ≈ **94.52%**(语句 88.47%) - mc2_moe:4/4 = **100%**(语句 90.72%) - mc2_moe_advanced:82/106 ≈ **77.36%**(语句 84.22%) - files 静态检查:无实质函数定义;含构造函数体的头已移出白名单。 ## 文档更新 ## 类型标签 <!-- [x] 表示选中 --> - [ ] 🐛 Bug修复 - [x] ✨ 新特性 - [ ] ⚡ 性能优化 - [ ] ♻️ 重构 - [x] 🧪 测试 - [ ] 📦 构建/CI - [x] 🔧 配置变更 - [ ] 📝 文档更新 - [ ] ⬆️ 依赖升级 - [ ] 🔒 安全修复 - [ ] 🧹 代码清理 - [ ] ❓ 其他,请描述: See merge request: cann/ops-transformer!14317 | 20 days ago | |
添加pybind11依赖声明 Co-authored-by: chenyifan<chenyifan66@h-partners.com> # message auto-generated for no-merge-commit merge: !9952 merge add_module into master 添加pybind11依赖声明 Created-by: mutex_lock Commit-by: chenyifan Merged-by: cann-robot Description: ## 描述 - requirements.txt中增加pybind11依赖声明 ## 关联的Issue https://gitcode.com/cann/ops-transformer/issues/4283 ## 测试 <!--描述进行了哪些测试来验证你的改动。包括但不限于二级冒烟、算子泛化等。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] 🐛 Bug修复 - [ ] ✨ 新特性 - [ ] ⚡ 性能优化 - [ ] ♻️ 重构 - [ ] 🧪 测试 - [ ] 📦 构建/CI - [ ] 🔧 配置变更 - [ ] 📝 文档更新 - [x] ⬆️ 依赖升级 - [ ] 🔒 安全修复 - [ ] 🧹 代码清理 - [ ] ❓ 其他,请描述: See merge request: cann/ops-transformer!9952 | 3 months ago | |
test(quant_flash_attn): 接入 QFA UT 的 CI 触发配置并修正 tiling 用例 Co-authored-by: yang-zhipeng19<yangzhipeng19@huawei.com> # message auto-generated for no-merge-commit merge: !15112 merge master into master test(quant_flash_attn): 接入 QFA UT 的 CI 触发配置并修正 tiling 用例 Created-by: yang-zhipeng19 Commit-by: yang-zhipeng19 Merged-by: cann-robot Description: ## 描述 QFA(quant_flash_attn)此前未接入 PR UT 触发配置,CI 的 --PR_UT 流程不会跑 QFA 的 UT。本 PR 完成接入并修正 tiling UT 用例: 1. tests/test_config.yaml 新增 quant_flash_attn 结点:attention/quant_flash_attn 与 attention/common/op_host 的变更会触发 quant_flash_attn 的 UT。 2. 修正 tests/ut/op_host/arch35/test_quant_flash_attn_tiling.csv: - 7 条 hif8 用例补齐 mask_mode=3/4 必需的 attn_mask(2048x2048,INT8,ND),此前因未传 mask 导致 UT 失败; - PA_BBND 非连续用例由合法的 axis0 改为真正不允许的 axis1(key_stride: 256 128 64 1),并重命名为 QFA_PA_BBND_key_axis1_noncontig_FAILED; - value/k_descale/v_descale 的 axis2 用例改为有效的 axis1(axis2 的 N=1,CheckTensorContiguous 会跳过 dim==1,原 axis2 用例无效),并删除重复的 key axis2 行; - QFA_metadata_dim_2D 期望由 FAILED 修正为 SUCCESS(checker 明确支持 1D/2D metadata,实测 tiling 正常)。 ## 关联的Issue #7017 ## 测试 - bash build.sh --ophost -u --ops=quant_flash_attn -j32 --soc=ascend950:149 passed / 0 failed - CI 同款:bash build.sh -u --ops=quant_flash_attn --cov --soc=ascend310p,ascend910b,ascend910_93,ascend950:exit=0,149 PASSED - 用本次变更文件列表模拟 cmake/scripts/parse_changed_files.py:Trigger UT: quant_flash_attn; ## 文档更新 无 ## 类型标签 - [x] 🧪 测试 - [x] 📦 构建/CI See merge request: cann/ops-transformer!15112 | 13 days ago | |
feat(mc2): 补齐责任田/UT SOC配置并新增文件覆盖率豁免名单 Co-authored-by: mutex_lock<chenyifan66@h-partners.com> # message auto-generated for no-merge-commit merge: !14317 merge ut_cov into master feat(mc2): 补齐责任田/UT SOC配置并新增文件覆盖率豁免名单 Created-by: mutex_lock Commit-by: mutex_lock Merged-by: cann-robot Description: ## 描述 补齐 mc2 算子看板责任田与 UT SOC 看护,并新增文件覆盖率豁免名单,支撑看板文件覆盖率统计与 CI 按变更触发正确芯片 UT。 ### 1. 责任田(classify_rule.yaml)本次补齐 相对补齐前,以下算子**新写入**责任田(✓ 表示本次写入该组): | 算子 | mc2_training | mc2_moe | mc2_moe_advanced | mc2_inference | |------|:------------:|:-------:|:----------------:|:-------------:| | allto_all_matmul_v2 | ✓ | | | | | all_gather_matmul_v3 | ✓ | | | ✓ | | matmul_all_reduce_add_rms_norm | ✓ | | | ✓ | | inplace_matmul_all_reduce_add_rms_norm | ✓ | | | ✓ | | attention_to_ffn_v2 | | | | ✓ | | ffn_to_attention_v2 | | | | ✓ | 补齐后:磁盘全部 **47** 个 mc2 算子均已在责任田中(含 tools / moe_ep_* / engram_* 等既有条目)。 ### 2. UT SOC(test_soc_config.yaml)本次补齐 / 重铺 **划分规则**(参考 quant_grouped_mat_mul_allto_allv): 1. 优先 op_host/op_tiling:arch35→ascend950,arch22→ascend910b,两边都有→两边都挂 2. 无 tiling arch:回退 op_kernel/arch22|arch35 3. 仍无:回退 op_host/config/<soc>/(ascend910_93 折叠进 ascend910b) 4. 写 mc2/<op>/op_host,若存在再写 tests/ut/op_host **本次新进入 SOC 的算子及对应芯片:** | 算子 | ascend310p | ascend910b | ascend950 | 判定依据(摘要) | |------|:----------:|:----------:|:---------:|------------------| | all_gather_matmul_v3 | | | ✓ | tiling arch35 | | allto_all_matmul_v2 | | | ✓ | tiling arch35 | | quant_grouped_mat_mul_allto_allv | | | ✓ | tiling arch35 | | distribute_barrier_extend | | | ✓ | kernel arch35 | | engram_fetch | | | ✓ | tiling arch35 | | engram_fetch_grad | | | ✓ | tiling arch35 | | engram_fetch_wait | | | ✓ | tiling arch35(暂无 UT) | | moe_distribute_combine_v3 | | ✓ | ✓ | tiling arch22+arch35 | | moe_distribute_dispatch_v3 | | ✓ | ✓ | tiling arch22+arch35 | | attention_to_ffn_v2 | | | ✓ | kernel arch35 | | ffn_to_attention_v2 | | | ✓ | kernel arch35 | **责任田本次补齐、但 SOC 此前已有映射的算子:** | 算子 | 责任田 | 当前 SOC | |------|--------|----------| | matmul_all_reduce_add_rms_norm | training + inference | ascend910b | | inplace_matmul_all_reduce_add_rms_norm | training + inference | ascend910b | **按规则重铺后,SOC 归属调整的既有算子:** | 算子 | 调整前 | 调整后 | |------|--------|--------| | all_gather_matmul | 910b | 910b + 950 | | distribute_barrier | 910b | 910b + 950 | | matmul_reduce_scatter | 910b | 910b + 950 | | moe_distribute_combine_setup / teardown | 950 | 910b + 950 | | moe_distribute_dispatch_setup / teardown | 950 | 910b + 950 | | quant_all_reduce | 910b + 950 | 950 | | quant_reduce_scatter | 910b + 950 | 950 | **未挂 SOC**(无 UT,且无 arch/config 可判定):moe_ep_combine / _epilogue、moe_ep_dispatch / _epilogue、tools。 覆盖汇总:ascend310p **1**、ascend910b **30**、ascend950 **35**;有 UT 的 mc2 算子均已进 SOC。 ### 3. 文件覆盖率豁免(tests/file_cov_exempt.yaml 新增) 按组件配置:dirs 豁免 op_kernel / op_graph,files 豁免纯声明/数据类型头。 仅影响看板文件覆盖率分母;未命中才豁免,命中优先并 WARN。 组件:mc2_training / mc2_moe / mc2_moe_advanced。 ## 关联的Issue https://gitcode.com/cann/ops-transformer/issues/6725 ## 测试 - 对照磁盘算子清单:classify_rule 47/47;有 UT 算子均在 test_soc_config 中。 - 本地验证文件覆盖率豁免(coverage.info + tianti): - mc2_training:138/146 ≈ **94.52%**(语句 88.47%) - mc2_moe:4/4 = **100%**(语句 90.72%) - mc2_moe_advanced:82/106 ≈ **77.36%**(语句 84.22%) - files 静态检查:无实质函数定义;含构造函数体的头已移出白名单。 ## 文档更新 ## 类型标签 <!-- [x] 表示选中 --> - [ ] 🐛 Bug修复 - [x] ✨ 新特性 - [ ] ⚡ 性能优化 - [ ] ♻️ 重构 - [x] 🧪 测试 - [ ] 📦 构建/CI - [x] 🔧 配置变更 - [ ] 📝 文档更新 - [ ] ⬆️ 依赖升级 - [ ] 🔒 安全修复 - [ ] 🧹 代码清理 - [ ] ❓ 其他,请描述: See merge request: cann/ops-transformer!14317 | 20 days ago |
| Files | Last commit | Last update |
|---|---|---|
| 1 month ago | ||
| 11 days ago | ||
| 26 days ago | ||
| 20 days ago | ||
| 3 months ago | ||
| 13 days ago | ||
| 20 days ago |