| 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 | |
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 | |
fix(common): 融合 pass 桩注册支持 ascend350,门控对齐 ops-math 名单制 Co-authored-by: huang-chuhong<huangchuhong1@h-partners.com> # message auto-generated for no-merge-commit merge: !17048 merge fix/op-graph-legacy-ascend350 into master fix(common): 融合 pass 桩注册支持 ascend350,门控对齐 ops-math 名单制 Created-by: huang-chuhong Commit-by: huang-chuhong Merged-by: cann-robot Description: ## 描述 参考 ops-math !7835,为 FE 融合 pass 桩注册的平台门控补上 ascend350,并将门控改为名单制。 ### 背景 - ascend350 与 ascend950 同属 dav_3510,OPP 白名单按 arch 3510 生效。--soc=ascend350 出包时 16 个桩名不会登记进 fe 表,白名单内的融合 pass 会被按"缺失"强制关闭、融合丢失(fusable-only 算子会在引擎选型阶段报 "Cannot find engine")。 - 本仓三类融合 pass 实现的平台门控均已覆盖 Ascend350:rope 系按 NpuArch ∈ {DAV_3510, DAV_9201/9202, DAV_5102}(DAV_3510 = Ascend950/Ascend350),mc2 系按 NPUARCH_A5(= DAV_3510),gmm 系显式判 short_soc_version ∈ {Ascend350, Ascend950}。即实现在包内、仅桩名缺登记。 - ops-math !7835 的门控名单为 ascend950/ascend350/ascend960dt/ascend960pr;本仓 !16731 仅同步了 950/960dt/960pr,遗漏 ascend350。 ### 改动 1. common/src/op_graph/CMakeLists.txt:门控从三次 IN_LIST 的 OR 判断改为遍历 ASCEND_COMPUTE_UNIT,命中 legacy 平台名单(ascend950、ascend350、ascend960dt、ascend960pr)时注入平台宏;后续新增平台只改名单,不再拉长判断。 2. 编译宏 OP_GRAPH_TRANSFORMER_ASCEND950 更名为 OP_GRAPH_TRANSFORMER_LEGACY,与实际覆盖范围一致(对齐 ops-math 的 OP_GRAPH_MATH_LEGACY)。 3. common/src/op_graph/fusion_pass_common.cpp:同步宏名和注释。 ### 影响 仅影响上述四个平台的构建注入(ascend350 为新增,950/960dt/960pr 行为不变);pass 名单、类型/attr、GE/CANN 版本门控均不变;其他平台行为不变。 --ops 选择性构建场景无需移植 ops-math !7835 的跳过逻辑:本仓 common/CMakeLists.txt 的桩构建入口已有 ENABLE_BUILT_IN 门控,build.sh --ops 强制 ENABLE_BUILT_IN=OFF,桩不会编入单算子包(ops-nn issue 9971 的缺陷在本仓不存在)。 ## 关联的Issue 无。机制背景关联:ops-math issue 3450、ops-nn issue 9971。 ## 测试 - 本地验证 CMake 门控逻辑(cmake -P 模拟):ascend350、ascend950、ascend960dt、ascend960pr 命中注入;ascend910b、ascend310p、mc62、空列表不命中;混合列表 ascend950;ascend910b 命中。 - 全仓确认旧宏 OP_GRAPH_TRANSFORMER_ASCEND950 零残留引用。 - git diff --check、行宽 ≤120、clang-format --dry-run --Werror 通过。 - 待 CI:ascend350 legacy 包构建后确认 libopgraph_transformer.so 中存在桩注册名字;确认 ascend950/ascend960dt/ascend960pr 及其他平台行为不变。 ## 文档更新 无。 ## 类型标签 - [x] 🐛 Bug修复 - [ ] ✨ 新特性 - [ ] ⚡ 性能优化 - [ ] ♻️ 重构 - [ ] 🧪 测试 - [ ] 📦 构建/CI - [ ] 🔧 配置变更 - [ ] 📝 文档更新 - [ ] ⬆️ 依赖升级 - [ ] 🔒 安全修复 - [ ] 🧹 代码清理 - [ ] ❓ 其他,请描述: See merge request: cann/ops-transformer!17048 | 3 days ago | |
feat(5162a): RegBase支持DAV_5162,5162A跳过mc2模块 Co-authored-by: wuxuening<wuxuening2@huawei.com> # message auto-generated for no-merge-commit merge: !14033 merge br_5162a_regbase_mc2 into master feat(5162a): RegBase支持DAV_5162,5162A跳过mc2模块 Created-by: wuxuening Commit-by: wuxuening Merged-by: cann-robot Description: ## 描述 Ascend5162A(DAV_5162,端侧 Tiny 类芯片,无 CCU)公共框架适配: 1. common/src/op_host/tiling_util.cpp:IsRegbaseSocVersion 架构集合增加 DAV_5162; 2. common/include/external/aclnn_kernels/aclnn_platform.h:IsRegbase 架构集合增加 DAV_5162; 3. CMakeLists.txt:ascend5162a 下跳过 mc2 子目录(5162A 无 CCU,对齐 kirinx90/kirin9030/mc62 的既有裁剪模式); 4. cmake/func.cmake:CANNDEV mc2 glob 排除列表补充 ascend5162a。 ## 关联的Issue https://gitcode.com/cann/ops-transformer/issues/6265 ## 测试 - pre-commit 检查通过:clang-format(v18.1.8,按仓内 .clang-format)改动行校验通过(aclnn_platform.h 一处 138 列超限已按规范换行);OAT 合规扫描 0 issues; - g++ 语法校验:tiling_util.cpp(自有 + third_party/opbase 头链)0 error; - 本地 --soc=ascend5162a 构建基线通过(cann-5162a-ops-transformer run 包产出)。 ## 文档更新 无 ## 类型标签 - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-transformer!14033 | 29 days ago | |
fused_infer_attention_score算子arch38下host侧Tiling代码重构 Co-authored-by: HuLinjie<hu.linjie@huawei.com> # message auto-generated for no-merge-commit merge: !16968 merge dev into master fused_infer_attention_score算子arch38下host侧Tiling代码重构 Created-by: HuLinjie Commit-by: HuLinjie Merged-by: cann-robot Description: ## 描述 fused_infer_attention_score 算子的 arch38 分支 host 侧 Tiling 代码存在历史遗留的解引用崩溃隐患、安全红线问题及 TOPN 等问题;同时,Tiling 逻辑集中在单个文件中,文件代码行数超过 5000 行,且单个函数行数多、参数多、圈复杂度高,导致整体复杂度高、职责混杂,可读性与可维护性较差。 从而进行重构: - 消除历史解引用崩溃隐患,提升算子稳定性; - 降低函数复杂度,按职责拆分 Tiling 逻辑,提升代码可读性与可维护性; - 便于后续 arch38 分支的功能扩展与问题定位。 ## 关联的Issue 关联Issue:#8673 https://gitcode.com/cann/ops-transformer/issues/8673 关联Issue:#8299 https://gitcode.com/cann/ops-transformer/issues/8299 ## 测试 FIA Arch38下原有的所有泛化用例 + 新增的泛化用例 ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] 🐛 Bug修复 - [ ] ✨ 新特性 - [ ] ⚡ 性能优化 - [x] ♻️ 重构 - [ ] 🧪 测试 - [ ] 📦 构建/CI - [ ] 🔧 配置变更 - [ ] 📝 文档更新 - [ ] ⬆️ 依赖升级 - [ ] 🔒 安全修复 - [ ] 🧹 代码清理 - [ ] ❓ 其他,请描述: See merge request: cann/ops-transformer!16968 | 2 days ago |