| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
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 | 1 个月前 | |
【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 个月前 | |
【PR】: ge_error_codes.h重命名后修改ge仓引用 Co-authored-by: jikai-tyler<jikai5@huawei.com> # message auto-generated for no-merge-commit merge: !4039 merge ge_errorcode into develop 【PR】: ge_error_codes.h重命名后修改ge仓引用 Created-by: jikai-tyler Commit-by: jikai-tyler Merged-by: cann-robot Description: # Pull Request ## 描述 ge_error_codes.h重命名后修改ge仓引用。 ## 变更类型 请选择本次引入的变更类型: <!-- [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!4039 | 1 个月前 | |
[binary]【PR】: 新增option ge.inputHintValue 支持host tensor 符号化推导 Co-authored-by: chengyutao3<chengyutao3@huawei.com> # message auto-generated for no-merge-commit merge: !4251 merge develop into develop [binary]【PR】: 新增option ge.inputHintValue 支持host tensor 符号化推导 Created-by: chengyutao3 Commit-by: chengyutao3 Merged-by: cann-robot Description: # Pull Request ## 描述 新增编译期选项 ge.inputHintValue(格式如 1:[5, 400]),用于在动态 shape 编译时没有真实输入数据的场景下,为"值相关"输入(如 Reshape 的 shape 输入)提供 hint 值,使符号化 shape 推导仍能正常进行。此前仅有 ge.inputHintShape 提供形状 hint,缺少值 hint 能力。 主要变更内容: 1. **选项定义与注册** - ge_common_api_types.h:新增常量 INPUT_HINT_VALUE = "ge.inputHintValue",并加入 ir_builder_suppported_options。 - option_supportion_checker.cc:将 ge.inputHintValue 加入受支持的 graph_options。 2. **解析逻辑(option_utils.cc/h)** - 将 ParseHintInputShape 中的内联解析代码抽取为通用模板 ParseIndexedListOption(支持 index:value 分号分隔、index 去重与非负校验),供 shape 和 value 复用。 - 新增 ConstructValueListFromStr(解析 [v0,v1,...] 列表,值非负)与 ParseHintInputValue(输出 map<int64_t, vector<int64_t>>)。 - 顺带修正原 ParseHintInputShape 中 max_index 的计算逻辑。 3. **符号化(symbolic_shape_symbolizer.cc/h)** - 新增 SymbolizeInputValue:对每个 Data 节点,优先使用真实 host 数据(支持 DT_INT32/INT64/UINT32/UINT64)创建常量符号;无真实数据时回退到 hint value map。 - 新增 InputValueElementSource,生成运行时回读对应 graph 输入指定元素值的源码,保证真实执行时符号值能取到实际值。 - SYMBOLIZE_VALUE_TYPE_SUM 路径增加判断:已符号化过 value 的输入不再重复处理。 4. **值相关输入识别(symbolic_infer_util.cc/h)** - 新增 IsValueDependentDataNode:遍历 Data 输出的消费算子,通过 IsInputDataDependency 或 op_infer_depends 属性判断该输入是否依赖数据值(如 Reshape 的 shape 输入)。 5. **编译期取宿主数据(jit_executor.cc / execution_order.cc)** - 新增 GetAllValueDependentData,将"值相关"Data 节点的 index 并入 need_host_data_idx,确保编译期以 host tensor 形式提供符号化所需数据。 - INPUT_HINT_VALUE 加入 kFirstEPOptions,在首个执行点即处理。 6. **测试** - 新增 UT symbolic_value_inference_unittest.cc,覆盖"hint value 推导成功"与"真实数据优先于 hint"两条路径。 - 新增 ST 用例 test_symbolize_value_and_infer.cc。 - jit_executor_unittest.cc / jit_share_graph.cc:将 Reshape 的 shape 输入 data 由 DT_INT32 调整为 DT_INT64,以适配真实 Reshape shape 输入类型。 ## 变更类型 请选择本次引入的变更类型: <!-- [x] 表示选中 --> - [ ] 🐛 Bug 修复 - [x] ✨ 新功能 - [ ] 💄 代码风格更新(格式化,局部变量) - [ ] ♻️ 重构(既不修复错误也不增加功能的代码变动) - [ ] 📦 构建过程或辅助工具的变动 - [ ] 📝 文档内容更新 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在当前页面的右侧'关联Issue'部分添加相应Issue链接,并勾选'合并后关闭已关联的 Issue'选项。 --> 无 ## 如何测试 描述测试此变更的步骤和前提条件: 1. 编译并运行新增单测: - symbolic_value_inference_unittest.cc:验证 hint value 场景下 Reshape 符号化推导成功,以及真实 host data 优先于 hint value。 - jit_executor_unittest.cc:验证含 Reshape 节点的图在 jit 执行路径下正常编译执行。 2. 编译并运行新增 ST 用例: - test_symbolize_value_and_infer.cc 中 reshape_symbolize_infer_with_input_hint_value:仅配置 hint(1:[5, 400]),验证推导出的输出 shape hint 为 5/400。 - reshape_symbolize_infer_with_real_data:提供真实 data({100, 20}),验证以真实数据为准。 3. 手工验证:对含 Reshape(shape 输入为 host 数据)的动态 shape 图分别执行以下配置,确认编译均成功且结果正确: - 不设置 ge.inputHintValue,但有真实 host 输入数据。 - 设置 ge.inputHintValue(如 "1:[5, 400]"),无真实输入数据。 ## 核对清单 <!-- [x] 表示选中 --> - [x] 我的代码遵循了项目的代码风格 - [x] 我已对代码进行了自测 - [x] 我已更新了相关的文档 - [x] 我在标题中使用了合适的类型标签(如:feat:, fix:) - [x] 我已经详细阅读了贡献指南(CONTRIBUTING.md),并遵守了其中的所有规定,包括但不限于commit message的格式、无效commit的合并等 ## 其他信息 在此添加任何其他关于本次 PR 的说明。 设计原则:真实 host data 的优先级高于 hint value,保证编译与真实执行时取到的符号值一致。 See merge request: cann/ge!4251 | 11 天前 | |
feat: run Python custom op infer_meta at compile time and RT2 Co-authored-by: lfz<220252399@seu.edu.cn> # message auto-generated for no-merge-commit merge: !4414 merge develop3 into develop feat: run Python custom op infer_meta at compile time and RT2 Created-by: lfz2812 Commit-by: lfz Merged-by: cann-robot Description: # Pull Request ## 描述 在 Python 自定义算子原型注册、Bridge、Adapter 和 canonical IR 链路的基础上,接通 Python infer_meta 回调,使注册的 Python 原型可以参与编译期和 RT2 动态 Shape 推导。 本次主要包含: 1. 接通 Python infer_meta 回调: - 将 register_op 装饰函数作为 Python infer_meta 函数使用。 - 根据 canonical IR 组装 required、optional、dynamic 输入。 - 根据属性 IR 类型读取运行时属性。 - 将输入转换为 TensorDesc,将属性转换为 Python 参数。 - 支持 required、optional、dynamic 输入和 required、dynamic 输出。 - 支持多输出和动态输出实例数量校验。 - 校验 Python 返回值类型、结构和输出数量。 2. 新增 InferShape native context: - 提供输入 shape 和 data type 读取能力。 - 提供动态输入实例数量查询。 - 提供运行时属性读取能力。 - 提供动态输出实例数量查询。 - 提供输出 shape 写回能力。 - callback 结束后使 borrowed context 及其派生对象失效。 3. 接通编译期 Meta 推导: - 在 Graph Metadef 编译期识别 CustomOpInferMetaProvider。 - 每个算子节点只调用一次 Python infer_meta。 - 推导成功后统一更新输出 shape、data type 和 origin data type。 - 使用临时 OpDesc 承载推导结果,所有校验成功后再提交到原始 OpDesc。 - 任意推导、返回值或格式转换失败时,不提交部分输出结果。 4. 接通 RT2 动态 Shape 推导: - RT2 的 custom op shape kernel 优先复用 infer_meta 回调。 - Python callback 读取当前运行时输入元信息和属性。 - 运行期只更新输出 shape,已编译的 data type 不被覆盖。 - 保留普通 C++ custom op 的 ShapeInferOp fallback 路径。 5. 扩展 Bridge、Adapter 和注册结构: - 扩展 Bridge C ABI,传递 Python infer_meta callback。 - 扩展 Python custom op Adapter 的 infer_meta 能力。 - 支持 Python proto-only、Python proto + impl 和 infer-only 场景。 - 保持现有 Python execute、schema-bound execute 和 legacy execute(ctx) 行为。 - 保持 callback、holder、runtime registry 和卸载生命周期管理方式不变。 6. 补充测试和设计说明: - 补充 Python infer_meta 参数组装、属性读取、返回值校验和动态输出测试。 - 补充 InferShapeContext native binding 测试。 - 补充 C++ Adapter、Bridge callback 和 infer-only adapter 测试。 - 补充 Graph Metadef 编译期 shape/dtype/origin dtype 回写及失败原子性测试。 - 补充 RT2 Python infer_meta 动态 Shape ST。 - 同步更新中英文 Python 自定义算子设计文档。 ## 变更类型 请选择本次引入的变更类型: <!-- [x] 表示选中 --> - [ ] 🐛 Bug 修复 - [x] ✨ 新功能 - [ ] 💄 代码风格更新(格式化,局部变量) - [ ] ♻️ 重构(既不修复错误也不增加功能的代码变动) - [ ] 📦 构建过程或辅助工具的变动 - [x] 📝 文档内容更新 ## 关联的Issue 无。 ## 如何测试 建议执行: bash cmake --build build_ut \ --target install_ge_py_for_tests \ ut_exe_graph \ ut_libge_multiparts_utest \ ut_fast_runtime2_test \ -j4 python3 -m pytest \ tests/ge/ut/ge/graph/pyge_tests/python_custom_op_infer_meta_test.py \ -q ctest --test-dir build_ut \ -R 'ut_exe_graph|ut_libge_multiparts_utest|ut_fast_runtime2_test' \ --output-on-failure cmake --build build_st --target graph_engine_test -j4 ctest --test-dir build_st \ -R graph_engine_test \ --output-on-failure git diff --check ## 核对清单 <!-- [x] 表示选中 --> - [x] 我的代码遵循了项目的代码风格 - [x] 我已对代码进行了自测 - [x] 我已更新了相关的文档 - [x] 我在标题中使用了合适的类型标签(如:feat:, fix:) - [x] 我已经详细阅读了贡献指南(CONTRIBUTING.md),并遵守了其中的所有规定,包括但不限于commit message的格式、无效commit的合并等 ## 其他信息 - 本次仅接通 Python infer_meta 的编译期和 RT2 动态 Shape 链路。 - 本次不新增公开 API,不修改 register_op API 文档,不修改 user_guides。 - 不支持 data-dependent infer、InferShapeRange、format inference、symbolic inference 和 shape rule generation。 - 不修改 OM 格式、DavinciModel 接口或 RT2 到 V1 的边界数据。 - 不修改 build_fwk.sh 等公共构建脚本。 - 保持 Python native、Bridge 和 Adapter 按同一 ABI 版本整体构建和替换。 See merge request: cann/ge!4414 | 2 天前 | |
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 | 4 天前 | |
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 | 1 个月前 |