| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
feat: 支持自动多流配置与自动寻优工作流 Co-authored-by: KenChow<zhouchen53@huawei.com> # message auto-generated for no-merge-commit merge: !4301 merge multi_stream_custom_pass into develop feat: 支持自动多流配置与自动寻优工作流 Created-by: KenChow Commit-by: KenChow Merged-by: cann-robot Description: # Pull Request ## 描述 新增 GE 自动多流的配置入口与自动寻优工作流,使用户无需修改模型代码即可选择、验证并挑选最优的多流并行策略。 **1. 自动多流配置入口(compiler)** - StreamUtils 新增 AutoMultistreamMode / AutoMultistreamConfig,统一解析 ge.autoMultistreamParallelMode 的取值:cv、LoadBalance:N、MainStream:N、WeightedLoadBalance:N(N 取值 [1, 64]),以及仅允许由自定义 Pass 通过图属性下发的 default。 - 模式来源从「仅 option」扩展为「option + 根图同名图属性」,图属性优先,便于自定义 Pass 在编译期动态切换策略。 - 收敛 LogicalStreamAllocator、EnginePartitioner 与 MiniDAGStreamPass 的门控逻辑,统一走上述解析结果,非法取值统一报错。 **2. 执行步骤打点(runtime/v1)** - 新增 runtime/v1/common/multi_stream_tuning:model_tuning_config 通过模型属性 _auto_multistream_tuning_mode 识别调优态;step_recorder 提供 RAII 的 StepScope,按 STEP 日志输出单步耗时。 - 非调优态(mode 为空)退化为空对象,不取时间戳、不分配资源,生产路径零开销;同线程仅统计最外层执行,避免嵌套重复打点。 - 打点接入 DavinciModel(NnExecute / Run)与 RT2.0 ModelV2Executor,覆盖 ACL、静态执行器、Hybrid 与 RT2.0 四条执行路径。 **3. 自动寻优样例(examples/multi_stream_autotune)** - ge_ms_autotune.py:候选模式批量编译、OM 复用、输出一致性校验、耗时统计与最优策略推荐。 - 配套自定义 Pass(下发 auto_multistream_tuning_graph 图属性)、sample_run.py 运行脚本及中英文 README。 **4. 测试** - 新增/补充 UT 与 ST,覆盖模式解析与非法值分支、门控跳过分支、打点记录与执行器集成路径。 ## 变更类型 <!-- [x] 表示选中 --> - [ ] 🐛 Bug 修复 - [x] ✨ 新功能 - [ ] 💄 代码风格更新(格式化,局部变量) - [ ] ♻️ 重构(既不修复错误也不增加功能的代码变动) - [x] 📦 构建过程或辅助工具的变动 - [x] 📝 文档内容更新 ## 关联的Issue 无关联 Issue。 ## 如何测试 前提条件:已安装 CANN Toolkit,并 source <ASCEND_INSTALL_PATH>/set_env.sh。 1. 编译 UT/ST: bash cmake -DCMAKE_BUILD_TYPE=GCOV -DENABLE_OPEN_SRC=True -DENABLE_GE_UT=ON -DENABLE_GE_ST=ON \ -DENABLE_TEST=True -DENABLE_PKG=ON -DASCEND_INSTALL_PATH=${ASCEND_INSTALL_PATH} \ -S . -B cmake-build-gcov make -C cmake-build-gcov ut_libge_multiparts_utest ut_libge_distinct_load_utest \ ut_fast_runtime2_test graph_engine_test st_fast_runtime2_test -j$(nproc) 2. 执行本次新增/修改的用例: bash unset LD_LIBRARY_PATH; unset ASCEND_OPP_PATH ./cmake-build-gcov/ut_libge_multiparts_utest --gtest_filter='*MultiStreamTuning*:*StreamUtils*:*DagStreamAllocatorPass*' ./cmake-build-gcov/ut_libge_distinct_load_utest --gtest_filter='*DavinciModel*' ./cmake-build-gcov/ut_fast_runtime2_test --gtest_filter='*CustomPass*:*ModelV2ExecutorBuilder*' ./cmake-build-gcov/graph_engine_test --gtest_filter='*MultiStreamTuning*:*DagStreamAllocatorPass*' ./cmake-build-gcov/st_fast_runtime2_test --gtest_filter='*MultiStream*' 3. 运行自动寻优样例(端到端): bash cd examples/multi_stream_autotune # 编译并安装寻优自定义 Pass cmake -S custom_pass -B build && cmake --build build --parallel # 单独跑一次被测样例,确认多流生效 GE_AUTO_MULTISTREAM_PARALLEL_MODE=LoadBalance:4 python3 sample_run.py --steps 12 --dim 512 # 批量寻优并查看推荐结果 python3 ge_ms_autotune.py --run-command "python3 sample_run.py --steps 12" \ --strategies LoadBalance,MainStream --streams 2,4,8 --repeat 3 --output-dir ./tune_out 预期:各候选配置的 STEP 打点被正确解析,输出耗时排名与推荐配置;详细步骤与参数见 examples/multi_stream_autotune/README.md。 ## 核对清单 <!-- [x] 表示选中 --> - [x] 我的代码遵循了项目的代码风格 - [x] 我已对代码进行了自测 - [x] 我已更新了相关的文档 - [x] 我在标题中使用了合适的类型标签(如:feat:, fix:) - [x] 我已经详细阅读了贡献指南(CONTRIBUTING.md),并遵守了其中的所有规定,包括但不限于commit message的格式、无效commit的合并等 ## 其他信息 - 本 PR 不改变默认行为:未配置 ge.autoMultistreamParallelMode 时编译流程与打点逻辑保持原状。 - git diff --check origin/develop...HEAD 的行尾提示仅涉及 3 个上游原本即全量使用 CRLF 的测试文件,本次保持其既有行尾格式,未引入行尾转换。 See merge request: cann/ge!4301 | 19 天前 | |
【PR】: 内部头文件重名整改 -- 同名不同内容 Co-authored-by: jikai-tyler<jikai5@huawei.com> # message auto-generated for no-merge-commit merge: !3497 merge ge_header_internal_2 into develop 【PR】: 内部头文件重名整改 -- 同名不同内容 Created-by: jikai-tyler Commit-by: jikai-tyler Merged-by: cann-robot Description: # Pull Request ## 描述 | 原文件路径 | 原名 | 修改后名称 | |-----------|------|-----------| | base/common/helper/mobile/ | model.h | mobile_model.h | | base/common/math/ | math_util.h | ge_math_util.h | | compiler/engines/cpu_engine/common/util/ | log.h | aicpu_log.h | | compiler/engines/cpu_engine/inc/ | graph_pass.h | cpu_engine_graph_pass.h | | compiler/engines/cpu_engine/inc/ | pass.h | cpu_engine_pass.h | | compiler/engines/cpu_engine/tf_engine/tf_optimizer/ | tensorflow_util.h | tf_optimizer_tensorflow_util.h | | compiler/engines/hccl_engine/hcom_graph_adaptor/ge_plugin/calculation_tool/ | model.h | hcom_model.h | | compiler/engines/hccl_engine/hcom_graph_adaptor/ge_plugin/ | plugin_manager.h | hcom_plugin_manager.h | | compiler/engines/local_engine/ops_kernel_store/op/ | op.h | ge_local_op.h | | compiler/engines/local_engine/ops_kernel_store/op/ | op_factory.h | ge_local_op_factory.h | | compiler/engines/manager/engine/ | engine_manager.h | dnn_engine_manager.h | | compiler/engines/manager/opskernel_manager/ | ops_kernel_manager.h | dnn_ops_kernel_manager.h | | compiler/engines/nn_engine/inc/common/ | math_util.h | nn_engine_math_util.h | | compiler/engines/nn_engine/optimizer/ops_kernel_builder/task_builder/ | dsa_task_builder.h | ops_kernel_dsa_task_builder.h | | compiler/engines/nn_engine/utils/common/ | plugin_manager.h | nn_engine_plugin_manager.h | | compiler/engines/rts_engine/common/util/ | log.h | rts_log.h | | compiler/graph/build/stream/ | stream_allocator.h | graph_stream_allocator.h | | compiler/graph/common/compress/inc/ | log.h | compress_log.h | | compiler/graph/eager_style_graph_builder/es_generator/ | utils.h | es_generator_utils.h | | compiler/graph/passes/ | pass.h | compiler_pass.h | | compiler/opcompiler/op_compile_adapter/source/compile/ | fusion_manager.h | opcompiler_fusion_manager.h | | dflow/llm_datadist/v1/common/ | cache_manager.h | llm_datadist_cache_manager.h | | dflow/llm_datadist/v1/common/ | llm_common.h | llm_datadist_common.h | | dflow/llm_datadist/v1/common/ | mem_utils.h | llm_datadist_mem_utils.h | | dflow/pydflow/wrapper/ | utils.h | pydflow_utils.h | | dflow/udf/execute/ | memory_statistic_manager.h | udf_memory_statistic_manager.h | | dflow/udf/flow_func/ | flow_model.h | udf_flow_model.h | | inc/framework/common/ | op_types.h | framework_op_types.h | | inc/graph_metadef/common/ge_common/debug/ | log.h | ge_common_log.h | | inc/graph_metadef/graph/utils/ | mem_utils.h | graph_mem_utils.h | | inc/graph_metadef/register/graph_optimizer/graph_fusion/ | connection_matrix.h | fusion_connection_matrix.h | | inc/graph_metadef/register/graph_optimizer/graph_fusion/ | graph_pass.h | graph_fusion_graph_pass.h | | inc/graph_metadef/register/graph_optimizer/graph_fusion/ | pass.h | graph_fusion_pass.h | | parser/parser/common/ | graph_pass.h | parser_graph_pass.h | | parser/parser/common/ | pass.h | parser_pass.h | | runtime/v1/graph/load/model_manager/task_info/ffts_plus/ | ffts_plus_proto_transfer.h | v1_ffts_plus_proto_transfer.h | | runtime/v1/graph/manager/ | host_mem_allocator.h | v1_host_mem_allocator.h | | runtime/v1/hybrid/model/infer/ | shape_utils.h | hybrid_shape_utils.h | | runtime/v2/core/utils/ | executor_utils.h | rt2_executor_utils.h | | runtime/v2/core/utils/ | tensor_utils.h | rt2_tensor_utils.h | | runtime/v2/utils/ | utils.h | rt2_utils.h | ## 变更类型 请选择本次引入的变更类型: <!-- [x] 表示选中 --> - [ ] 🐛 Bug 修复 - [x] ✨ 新功能 - [ ] 💄 代码风格更新(格式化,局部变量) - [ ] ♻️ 重构(既不修复错误也不增加功能的代码变动) - [ ] 📦 构建过程或辅助工具的变动 - [ ] 📝 文档内容更新 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在当前页面的右侧'关联Issue'部分添加相应Issue链接,并勾选'合并后关闭已关联的 Issue'选项。 --> ## 如何测试 描述测试此变更的步骤和前提条件: 1. 2. ## 核对清单 <!-- [x] 表示选中 --> - [x] 我的代码遵循了项目的代码风格 - [x] 我已对代码进行了自测 - [x] 我已更新了相关的文档 - [x] 我在标题中使用了合适的类型标签(如: feat:, fix:) - [x] 我已经详细阅读了贡献指南(CONTRIBUTING.md),并遵守了其中的所有规定,包括但不限于commit message的格式、无效commit的合并等 ## 其他信息 在此添加任何其他关于本次 PR 的说明。 See merge request: cann/ge!3497 | 1 个月前 | |
fix: fix clean code warnings Co-authored-by: likun104<likun104@h-partners.com> # message auto-generated for no-merge-commit merge: !3941 merge br_fix_clean_code_warnings_0709 into develop fix: fix clean code warnings Created-by: likun104 Commit-by: likun104 Merged-by: cann-robot Description: # Pull Request ## 描述 清理ge仓中的clean code告警 ## 变更类型 请选择本次引入的变更类型: <!-- [x] 表示选中 --> - [x] 🐛 Bug 修复 - [ ] ✨ 新功能 - [ ] 💄 代码风格更新(格式化,局部变量) - [ ] ♻️ 重构(既不修复错误也不增加功能的代码变动) - [ ] 📦 构建过程或辅助工具的变动 - [ ] 📝 文档内容更新 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在当前页面的右侧'关联Issue'部分添加相应Issue链接,并勾选'合并后关闭已关联的 Issue'选项。 --> ## 如何测试 描述测试此变更的步骤和前提条件: 1. 流水线跑通过 ## 核对清单 <!-- [x] 表示选中 --> - [x] 我的代码遵循了项目的代码风格 - [x] 我已对代码进行了自测 - [x] 我已更新了相关的文档 - [x] 我在标题中使用了合适的类型标签(如: feat:, fix:) - [x] 我已经详细阅读了贡献指南(CONTRIBUTING.md),并遵守了其中的所有规定,包括但不限于commit message的格式、无效commit的合并等 ## 其他信息 在此添加任何其他关于本次 PR 的说明。 See merge request: cann/ge!3941 | 20 天前 | |
fix: fix clean code warnings Co-authored-by: likun104<likun104@h-partners.com> # message auto-generated for no-merge-commit merge: !3941 merge br_fix_clean_code_warnings_0709 into develop fix: fix clean code warnings Created-by: likun104 Commit-by: likun104 Merged-by: cann-robot Description: # Pull Request ## 描述 清理ge仓中的clean code告警 ## 变更类型 请选择本次引入的变更类型: <!-- [x] 表示选中 --> - [x] 🐛 Bug 修复 - [ ] ✨ 新功能 - [ ] 💄 代码风格更新(格式化,局部变量) - [ ] ♻️ 重构(既不修复错误也不增加功能的代码变动) - [ ] 📦 构建过程或辅助工具的变动 - [ ] 📝 文档内容更新 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在当前页面的右侧'关联Issue'部分添加相应Issue链接,并勾选'合并后关闭已关联的 Issue'选项。 --> ## 如何测试 描述测试此变更的步骤和前提条件: 1. 流水线跑通过 ## 核对清单 <!-- [x] 表示选中 --> - [x] 我的代码遵循了项目的代码风格 - [x] 我已对代码进行了自测 - [x] 我已更新了相关的文档 - [x] 我在标题中使用了合适的类型标签(如: feat:, fix:) - [x] 我已经详细阅读了贡献指南(CONTRIBUTING.md),并遵守了其中的所有规定,包括但不限于commit message的格式、无效commit的合并等 ## 其他信息 在此添加任何其他关于本次 PR 的说明。 See merge request: cann/ge!3941 | 20 天前 | |
【PR】: 内部头文件重名整改 -- 同名不同内容 Co-authored-by: jikai-tyler<jikai5@huawei.com> # message auto-generated for no-merge-commit merge: !3497 merge ge_header_internal_2 into develop 【PR】: 内部头文件重名整改 -- 同名不同内容 Created-by: jikai-tyler Commit-by: jikai-tyler Merged-by: cann-robot Description: # Pull Request ## 描述 | 原文件路径 | 原名 | 修改后名称 | |-----------|------|-----------| | base/common/helper/mobile/ | model.h | mobile_model.h | | base/common/math/ | math_util.h | ge_math_util.h | | compiler/engines/cpu_engine/common/util/ | log.h | aicpu_log.h | | compiler/engines/cpu_engine/inc/ | graph_pass.h | cpu_engine_graph_pass.h | | compiler/engines/cpu_engine/inc/ | pass.h | cpu_engine_pass.h | | compiler/engines/cpu_engine/tf_engine/tf_optimizer/ | tensorflow_util.h | tf_optimizer_tensorflow_util.h | | compiler/engines/hccl_engine/hcom_graph_adaptor/ge_plugin/calculation_tool/ | model.h | hcom_model.h | | compiler/engines/hccl_engine/hcom_graph_adaptor/ge_plugin/ | plugin_manager.h | hcom_plugin_manager.h | | compiler/engines/local_engine/ops_kernel_store/op/ | op.h | ge_local_op.h | | compiler/engines/local_engine/ops_kernel_store/op/ | op_factory.h | ge_local_op_factory.h | | compiler/engines/manager/engine/ | engine_manager.h | dnn_engine_manager.h | | compiler/engines/manager/opskernel_manager/ | ops_kernel_manager.h | dnn_ops_kernel_manager.h | | compiler/engines/nn_engine/inc/common/ | math_util.h | nn_engine_math_util.h | | compiler/engines/nn_engine/optimizer/ops_kernel_builder/task_builder/ | dsa_task_builder.h | ops_kernel_dsa_task_builder.h | | compiler/engines/nn_engine/utils/common/ | plugin_manager.h | nn_engine_plugin_manager.h | | compiler/engines/rts_engine/common/util/ | log.h | rts_log.h | | compiler/graph/build/stream/ | stream_allocator.h | graph_stream_allocator.h | | compiler/graph/common/compress/inc/ | log.h | compress_log.h | | compiler/graph/eager_style_graph_builder/es_generator/ | utils.h | es_generator_utils.h | | compiler/graph/passes/ | pass.h | compiler_pass.h | | compiler/opcompiler/op_compile_adapter/source/compile/ | fusion_manager.h | opcompiler_fusion_manager.h | | dflow/llm_datadist/v1/common/ | cache_manager.h | llm_datadist_cache_manager.h | | dflow/llm_datadist/v1/common/ | llm_common.h | llm_datadist_common.h | | dflow/llm_datadist/v1/common/ | mem_utils.h | llm_datadist_mem_utils.h | | dflow/pydflow/wrapper/ | utils.h | pydflow_utils.h | | dflow/udf/execute/ | memory_statistic_manager.h | udf_memory_statistic_manager.h | | dflow/udf/flow_func/ | flow_model.h | udf_flow_model.h | | inc/framework/common/ | op_types.h | framework_op_types.h | | inc/graph_metadef/common/ge_common/debug/ | log.h | ge_common_log.h | | inc/graph_metadef/graph/utils/ | mem_utils.h | graph_mem_utils.h | | inc/graph_metadef/register/graph_optimizer/graph_fusion/ | connection_matrix.h | fusion_connection_matrix.h | | inc/graph_metadef/register/graph_optimizer/graph_fusion/ | graph_pass.h | graph_fusion_graph_pass.h | | inc/graph_metadef/register/graph_optimizer/graph_fusion/ | pass.h | graph_fusion_pass.h | | parser/parser/common/ | graph_pass.h | parser_graph_pass.h | | parser/parser/common/ | pass.h | parser_pass.h | | runtime/v1/graph/load/model_manager/task_info/ffts_plus/ | ffts_plus_proto_transfer.h | v1_ffts_plus_proto_transfer.h | | runtime/v1/graph/manager/ | host_mem_allocator.h | v1_host_mem_allocator.h | | runtime/v1/hybrid/model/infer/ | shape_utils.h | hybrid_shape_utils.h | | runtime/v2/core/utils/ | executor_utils.h | rt2_executor_utils.h | | runtime/v2/core/utils/ | tensor_utils.h | rt2_tensor_utils.h | | runtime/v2/utils/ | utils.h | rt2_utils.h | ## 变更类型 请选择本次引入的变更类型: <!-- [x] 表示选中 --> - [ ] 🐛 Bug 修复 - [x] ✨ 新功能 - [ ] 💄 代码风格更新(格式化,局部变量) - [ ] ♻️ 重构(既不修复错误也不增加功能的代码变动) - [ ] 📦 构建过程或辅助工具的变动 - [ ] 📝 文档内容更新 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在当前页面的右侧'关联Issue'部分添加相应Issue链接,并勾选'合并后关闭已关联的 Issue'选项。 --> ## 如何测试 描述测试此变更的步骤和前提条件: 1. 2. ## 核对清单 <!-- [x] 表示选中 --> - [x] 我的代码遵循了项目的代码风格 - [x] 我已对代码进行了自测 - [x] 我已更新了相关的文档 - [x] 我在标题中使用了合适的类型标签(如: feat:, fix:) - [x] 我已经详细阅读了贡献指南(CONTRIBUTING.md),并遵守了其中的所有规定,包括但不限于commit message的格式、无效commit的合并等 ## 其他信息 在此添加任何其他关于本次 PR 的说明。 See merge request: cann/ge!3497 | 1 个月前 | |
fix: precommit整改 Co-authored-by: yelongjian<yelongjian1@huawei.com> # message auto-generated for no-merge-commit merge: !3726 merge dev-precommit into develop fix: precommit整改 Created-by: yelongjian Commit-by: yelongjian Merged-by: cann-robot Description: # Pull Request ## 描述 precommit整改 ## 变更类型 请选择本次引入的变更类型: <!-- [x] 表示选中 --> - [ ] 🐛 Bug 修复 - [ ] ✨ 新功能 - [x] 💄 代码风格更新(格式化,局部变量) - [ ] ♻️ 重构(既不修复错误也不增加功能的代码变动) - [ ] 📦 构建过程或辅助工具的变动 - [ ] 📝 文档内容更新 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在当前页面的右侧'关联Issue'部分添加相应Issue链接,并勾选'合并后关闭已关联的 Issue'选项。 --> ## 如何测试 描述测试此变更的步骤和前提条件: 1.NA ## 核对清单 <!-- [x] 表示选中 --> - [x] 我的代码遵循了项目的代码风格 - [x] 我已对代码进行了自测 - [x] 我已更新了相关的文档 - [x] 我在标题中使用了合适的类型标签(如: feat:, fix:) - [x] 我已经详细阅读了贡献指南(CONTRIBUTING.md),并遵守了其中的所有规定,包括但不限于commit message的格式、无效commit的合并等 ## 其他信息 在此添加任何其他关于本次 PR 的说明。 See merge request: cann/ge!3726 | 2 个月前 | |
【Revert】【PR】: 新增option ge.inputHintValue 支持host tensor 符号化推导 回退 Co-authored-by: chengyutao3<chengyutao3@huawei.com> # message auto-generated for no-merge-commit merge: !4370 merge revert-mr-4251-1786611114690-auto into develop 【Revert】【PR】: 新增option ge.inputHintValue 支持host tensor 符号化推导 回退 Created-by: chengyutao3 Commit-by: chengyutao3 Merged-by: cann-robot Description: # Pull Request ## 描述 新增option ge.inputHintValue 支持host tensor 符号化推导 回退 ## 变更类型 请选择本次引入的变更类型: <!-- [x] 表示选中 --> - [x] 🐛 Bug 修复 - [ ] ✨ 新功能 - [ ] 💄 代码风格更新(格式化,局部变量) - [ ] ♻️ 重构(既不修复错误也不增加功能的代码变动) - [ ] 📦 构建过程或辅助工具的变动 - [ ] 📝 文档内容更新 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在当前页面的右侧'关联Issue'部分添加相应Issue链接,并勾选'合并后关闭已关联的 Issue'选项。 --> ## 如何测试 描述测试此变更的步骤和前提条件: 1. 2. ## 核对清单 <!-- [x] 表示选中 --> - [ ] 我的代码遵循了项目的代码风格 - [ ] 我已对代码进行了自测 - [ ] 我已更新了相关的文档 - [ ] 我在标题中使用了合适的类型标签(如: feat:, fix:) - [ ] 我已经详细阅读了贡献指南(CONTRIBUTING.md),并遵守了其中的所有规定,包括但不限于commit message的格式、无效commit的合并等 ## 其他信息 在此添加任何其他关于本次 PR 的说明。 See merge request: cann/ge!4370 | 26 天前 | |
【PR】: 修复 Broadcast/Tile + Reduce 时 Reshape 输入输出定义 Co-authored-by: Yulin-Bi<13677173705@163.com> # message auto-generated for no-merge-commit merge: !4474 merge Ge_dev_bi into develop 【PR】: 修复 Broadcast/Tile + Reduce 时 Reshape 输入输出定义 Created-by: JacsonPile Commit-by: Yulin-Bi Merged-by: cann-robot Description: # Pull Request ## 描述 修复 AutoFuse BroadcastReduceEliminationPass 消除 Broadcast/Tile + Reduce 模式后,替换生成的 Reshape 节点结构不完整、输出 shape 描述不一致的问题。 原实现手工创建 Reshape OpDesc,只连接数据输入,并通过 shape 属性记录目标 shape;同时,Reshape 输出描述由输入描述复制而来,仅更新了 GeShape,可能继续保留原输入的 OriginShape 和 symbolic shape。以复现用例为例,静态 shape 已变为 [256, 10],但 origin/symbolic shape 仍可能是 [256, 1, 10],导致后续 Concat 符号 shape 推导发现输入 rank 不一致并报错: text input_3_dim_num(2) != first_input_dim_num(3) 本次变更包括: 1. 按 Reshape 算子原型创建 data + shape 两个输入,其中目标 shape 由 DT_INT64 Const 节点提供,并连接到 Reshape 的第二个输入。 2. 将 Reshape 输出的 GeShape、OriginShape 和 SymbolicDescAttr.origin_symbol_shape 同步为同一个目标 shape,避免静态描述与符号描述的 rank 不一致。 3. 补充 UT 校验,覆盖 Reshape 双输入结构、shape Const 的类型和值、三类 shape 描述以及数据边连接关系。 4. 补充 UT 使用 NodeUtils 所需的直接头文件依赖。 ## 变更类型 请选择本次引入的变更类型: <!-- [x] 表示选中 --> - [x] 🐛 Bug 修复 - [ ] ✨ 新功能 - [ ] 💄 代码风格更新(格式化,局部变量) - [ ] ♻️ 重构(既不修复错误也不增加功能的代码变动) - [ ] 📦 构建过程或辅助工具的变动 - [ ] 📝 文档内容更新 ## 关联的Issue 暂无关联 Issue。 ## 如何测试 1. 编译并执行 autofusion_ut,重点运行 BroadcastReduceMax_EliminateWithSqueeze,确认: - Reshape 包含 data 和 shape 两个输入; - shape 输入来自 DT_INT64 Const,内容等于目标 shape; - 输出 GeShape、OriginShape 和 symbolic shape 一致; - 数据连接保持为 data -> Reshape -> relu。 2. 执行复现用例回归,确认不再出现 Concat 输入 rank 不一致错误。 3. 将输出与 CPU golden 比较。 当前验证结果: - 复现环境中的 ATC 编译已通过,不再出现 Concat symbolic shape rank 错误。 - ACL 执行返回 aclmdlExecute: ret=0,两个输出与 CPU golden 比对通过。 ## 核对清单 <!-- [x] 表示选中 --> - [x] 我的代码遵循了项目的代码风格 - [x] 我已对代码进行了自测 - [ ] 我已更新了相关的文档 - [x] 我在标题中使用了合适的类型标签(如:feat:, fix:) - [x] 我已经详细阅读了贡献指南(CONTRIBUTING.md),并遵守了其中的所有规定,包括但不限于commit message的格式、无效commit的合并等 ## 其他信息 - 影响文件: - compiler/graph/optimize/autofuse/autofuse/pattern_fusion/broadcast_reduce_elimination_pass.cpp - tests/autofuse/ut/autofuse/broadcast_reduce_elimination_pass_unittest.cpp See merge request: cann/ge!4474 | 19 天前 | |
feat: 支持自动多流配置与自动寻优工作流 Co-authored-by: KenChow<zhouchen53@huawei.com> # message auto-generated for no-merge-commit merge: !4301 merge multi_stream_custom_pass into develop feat: 支持自动多流配置与自动寻优工作流 Created-by: KenChow Commit-by: KenChow Merged-by: cann-robot Description: # Pull Request ## 描述 新增 GE 自动多流的配置入口与自动寻优工作流,使用户无需修改模型代码即可选择、验证并挑选最优的多流并行策略。 **1. 自动多流配置入口(compiler)** - StreamUtils 新增 AutoMultistreamMode / AutoMultistreamConfig,统一解析 ge.autoMultistreamParallelMode 的取值:cv、LoadBalance:N、MainStream:N、WeightedLoadBalance:N(N 取值 [1, 64]),以及仅允许由自定义 Pass 通过图属性下发的 default。 - 模式来源从「仅 option」扩展为「option + 根图同名图属性」,图属性优先,便于自定义 Pass 在编译期动态切换策略。 - 收敛 LogicalStreamAllocator、EnginePartitioner 与 MiniDAGStreamPass 的门控逻辑,统一走上述解析结果,非法取值统一报错。 **2. 执行步骤打点(runtime/v1)** - 新增 runtime/v1/common/multi_stream_tuning:model_tuning_config 通过模型属性 _auto_multistream_tuning_mode 识别调优态;step_recorder 提供 RAII 的 StepScope,按 STEP 日志输出单步耗时。 - 非调优态(mode 为空)退化为空对象,不取时间戳、不分配资源,生产路径零开销;同线程仅统计最外层执行,避免嵌套重复打点。 - 打点接入 DavinciModel(NnExecute / Run)与 RT2.0 ModelV2Executor,覆盖 ACL、静态执行器、Hybrid 与 RT2.0 四条执行路径。 **3. 自动寻优样例(examples/multi_stream_autotune)** - ge_ms_autotune.py:候选模式批量编译、OM 复用、输出一致性校验、耗时统计与最优策略推荐。 - 配套自定义 Pass(下发 auto_multistream_tuning_graph 图属性)、sample_run.py 运行脚本及中英文 README。 **4. 测试** - 新增/补充 UT 与 ST,覆盖模式解析与非法值分支、门控跳过分支、打点记录与执行器集成路径。 ## 变更类型 <!-- [x] 表示选中 --> - [ ] 🐛 Bug 修复 - [x] ✨ 新功能 - [ ] 💄 代码风格更新(格式化,局部变量) - [ ] ♻️ 重构(既不修复错误也不增加功能的代码变动) - [x] 📦 构建过程或辅助工具的变动 - [x] 📝 文档内容更新 ## 关联的Issue 无关联 Issue。 ## 如何测试 前提条件:已安装 CANN Toolkit,并 source <ASCEND_INSTALL_PATH>/set_env.sh。 1. 编译 UT/ST: bash cmake -DCMAKE_BUILD_TYPE=GCOV -DENABLE_OPEN_SRC=True -DENABLE_GE_UT=ON -DENABLE_GE_ST=ON \ -DENABLE_TEST=True -DENABLE_PKG=ON -DASCEND_INSTALL_PATH=${ASCEND_INSTALL_PATH} \ -S . -B cmake-build-gcov make -C cmake-build-gcov ut_libge_multiparts_utest ut_libge_distinct_load_utest \ ut_fast_runtime2_test graph_engine_test st_fast_runtime2_test -j$(nproc) 2. 执行本次新增/修改的用例: bash unset LD_LIBRARY_PATH; unset ASCEND_OPP_PATH ./cmake-build-gcov/ut_libge_multiparts_utest --gtest_filter='*MultiStreamTuning*:*StreamUtils*:*DagStreamAllocatorPass*' ./cmake-build-gcov/ut_libge_distinct_load_utest --gtest_filter='*DavinciModel*' ./cmake-build-gcov/ut_fast_runtime2_test --gtest_filter='*CustomPass*:*ModelV2ExecutorBuilder*' ./cmake-build-gcov/graph_engine_test --gtest_filter='*MultiStreamTuning*:*DagStreamAllocatorPass*' ./cmake-build-gcov/st_fast_runtime2_test --gtest_filter='*MultiStream*' 3. 运行自动寻优样例(端到端): bash cd examples/multi_stream_autotune # 编译并安装寻优自定义 Pass cmake -S custom_pass -B build && cmake --build build --parallel # 单独跑一次被测样例,确认多流生效 GE_AUTO_MULTISTREAM_PARALLEL_MODE=LoadBalance:4 python3 sample_run.py --steps 12 --dim 512 # 批量寻优并查看推荐结果 python3 ge_ms_autotune.py --run-command "python3 sample_run.py --steps 12" \ --strategies LoadBalance,MainStream --streams 2,4,8 --repeat 3 --output-dir ./tune_out 预期:各候选配置的 STEP 打点被正确解析,输出耗时排名与推荐配置;详细步骤与参数见 examples/multi_stream_autotune/README.md。 ## 核对清单 <!-- [x] 表示选中 --> - [x] 我的代码遵循了项目的代码风格 - [x] 我已对代码进行了自测 - [x] 我已更新了相关的文档 - [x] 我在标题中使用了合适的类型标签(如:feat:, fix:) - [x] 我已经详细阅读了贡献指南(CONTRIBUTING.md),并遵守了其中的所有规定,包括但不限于commit message的格式、无效commit的合并等 ## 其他信息 - 本 PR 不改变默认行为:未配置 ge.autoMultistreamParallelMode 时编译流程与打点逻辑保持原状。 - git diff --check origin/develop...HEAD 的行尾提示仅涉及 3 个上游原本即全量使用 CRLF 的测试文件,本次保持其既有行尾格式,未引入行尾转换。 See merge request: cann/ge!4301 | 19 天前 | |
fix: correct typo in reshape recovery pass log Co-authored-by: m0_50621083<hongyuecheng@huawei.com> # message auto-generated for no-merge-commit merge: !4468 merge fix-reshape-recovery-plog-typo into develop fix: correct typo in reshape recovery pass log Created-by: m0_50621083 Commit-by: m0_50621083 Merged-by: cann-robot Description: # Pull Request ## 描述 修复 reshape_recovery_pass.cc 中 plog 日志的单词拼写错误: - nad → and 该修改仅涉及日志文本,不影响功能逻辑。 ## 变更类型 请选择本次引入的变更类型: <!-- [x] 表示选中 --> - [x] 🐛 Bug 修复 - [ ] ✨ 新功能 - [ ] 💄 代码风格更新(格式化,局部变量) - [ ] ♻️ 重构(既不修复错误也不增加功能的代码变动) - [ ] 📦 构建过程或辅助工具的变动 - [ ] 📝 文档内容更新 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在当前页面的右侧'关联Issue'部分添加相应Issue链接,并勾选'合并后关闭已关联的 Issue'选项。 --> 无关联Issue ## 如何测试 描述测试此变更的步骤和前提条件: 1. 使用 git diff 检查修改内容,确认仅将日志中的 nad 修改为 and。 2. 使用 git diff --check 检查代码格式,确认无空白符或格式问题。 3. 使用 grep 检查对应源码,确认该处日志中不再存在 nad 拼写错误。 ## 核对清单 <!-- [x] 表示选中 --> - [x] 我的代码遵循了项目的代码风格 - [x] 我已对代码进行了自测 - [x] 我已更新了相关的文档 - [x] 我在标题中使用了合适的类型标签(如:feat:, fix:) - [x] 我已经详细阅读了贡献指南(CONTRIBUTING.md),并遵守了其中的所有规定,包括但不限于commit message的格式、无效commit的合并等 ## 其他信息 本次修改仅修复一处 plog 日志文本中的单词拼写错误,不涉及代码逻辑、接口行为及功能变更。 See merge request: cann/ge!4468 | 18 天前 | |
fix: fix clean code warnings Co-authored-by: likun104<likun104@h-partners.com> # message auto-generated for no-merge-commit merge: !3941 merge br_fix_clean_code_warnings_0709 into develop fix: fix clean code warnings Created-by: likun104 Commit-by: likun104 Merged-by: cann-robot Description: # Pull Request ## 描述 清理ge仓中的clean code告警 ## 变更类型 请选择本次引入的变更类型: <!-- [x] 表示选中 --> - [x] 🐛 Bug 修复 - [ ] ✨ 新功能 - [ ] 💄 代码风格更新(格式化,局部变量) - [ ] ♻️ 重构(既不修复错误也不增加功能的代码变动) - [ ] 📦 构建过程或辅助工具的变动 - [ ] 📝 文档内容更新 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在当前页面的右侧'关联Issue'部分添加相应Issue链接,并勾选'合并后关闭已关联的 Issue'选项。 --> ## 如何测试 描述测试此变更的步骤和前提条件: 1. 流水线跑通过 ## 核对清单 <!-- [x] 表示选中 --> - [x] 我的代码遵循了项目的代码风格 - [x] 我已对代码进行了自测 - [x] 我已更新了相关的文档 - [x] 我在标题中使用了合适的类型标签(如: feat:, fix:) - [x] 我已经详细阅读了贡献指南(CONTRIBUTING.md),并遵守了其中的所有规定,包括但不限于commit message的格式、无效commit的合并等 ## 其他信息 在此添加任何其他关于本次 PR 的说明。 See merge request: cann/ge!3941 | 20 天前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 19 天前 | ||
| 1 个月前 | ||
| 20 天前 | ||
| 20 天前 | ||
| 1 个月前 | ||
| 2 个月前 | ||
| 26 天前 | ||
| 19 天前 | ||
| 19 天前 | ||
| 18 天前 | ||
| 20 天前 |