| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
refactor: 移除 FunctionCompile 对 numa 配置的依赖,资源类型改为编译期固定生成 Co-authored-by: lining23666<lining.li@huawei.com> # message auto-generated for no-merge-commit merge: !4424 merge refactor/remove-numa-config-dep into develop refactor: 移除 FunctionCompile 对 numa 配置的依赖,资源类型改为编译期固定生成 Created-by: lining23666 Commit-by: lining23666 Merged-by: cann-robot Description: # Pull Request ## 描述 移除 CompileConfigJson::GetResourceTypeFromNumaConfig,FunctionCompile 中资源类型改为编译期固定生成 Ascend + host(X86/Aarch),消除对 numa 配置 JSON 的不必要运行时依赖。 主要变更: - 删除 GetResourceTypeFromNumaConfig 函数(唯一读取 OPTION_NUMA_CONFIG 的非测试代码),资源类型固定为 {kResourceTypeAscend, ExecutionRuntime::IsX86() ? kResourceTypeX86 : kResourceTypeAarch} - 删除 DeployLocation 类,将 IsX86() 静态方法迁移到 ExecutionRuntime 中 - 清理 compile_config_json.cc 中 ge_global_options.h/ge_types.h 无用 include - 清理 UT 测试中冗余的 OPTION_NUMA_CONFIG 设置代码 - 更新 dflow.md 文档中 _dflow_runnable_resource 属性描述 ## 变更类型 - [x] ♻️ 重构(既不修复错误也不增加功能的代码变动) ## 关联的Issue ## 如何测试 1. 编译 data_flow_base、dflow_runner、npu_executor_static(deployer)库 2. 编译并运行 ut_libge_helper_utest UT 测试 3. 编译 helper_runtime_test ST 测试 ## 核对清单 - [x] 我的代码遵循了项目的代码风格 - [x] 我已对代码进行了自测 - [x] 我已更新了相关的文档 - [x] 我在标题中使用了合适的类型标签(如:feat:, fix:) - [x] 我已经详细阅读了贡献指南(CONTRIBUTING.md),并遵守了其中的所有规定 ## 其他信息 **验证结果**: - data_flow_base 编译通过 - dflow_runner 编译通过 - npu_executor_static(deployer)编译通过 - ut_libge_helper_utest 编译通过,83 个测试用例全部 PASSED - helper_runtime_test(ST)编译通过 **行为变化说明**:之前若 numa 配置只含 Ascend,则只编译 Ascend;之后始终编译两种类型。但 CompileAllResourceType 已有容错(toolchain 不存在则 skip),不会因多编译一种类型而失败。 See merge request: cann/ge!4424 | 5 天前 | |
refactor: dflow session/compiler/executor 目录结构调整到 runner 平级目录 Co-authored-by: lining23666<lining.li@huawei.com> # message auto-generated for no-merge-commit merge: !4263 merge dflow into develop refactor: dflow session/compiler/executor 目录结构调整到 runner 平级目录 Created-by: lining23666 Commit-by: lining23666 Merged-by: cann-robot Description: ## 描述 将 dflow 的 session、compiler、executor 三个目录统一移入 dflow/runner/ 下,使 session 与 compiler、executor 处于平行层级。编译产物 libdflow_runner.so 输出到 dflow/runner/ 目录,目录结构与编译结果对应。 **调整前**: dflow/ ├── compiler/ ← 编译层(含 session 子目录) │ ├── CMakeLists.txt ← dflow_runner 编译定义 │ ├── data_flow_graph/ │ ├── model/ │ ├── pne/ │ └── session/ ← session 原在此 ├── executor/ ← 执行层 ├── deployer/ ├── ... **调整后**: dflow/ ├── runner/ ← 新建,dflow_runner 编译入口 │ ├── CMakeLists.txt ← dflow_runner 编译定义 │ ├── compiler/ ← 编译层 │ ├── executor/ ← 执行层 │ └── session/ ← session 层(与 compiler/executor 平级) ├── deployer/ ├── ... ## 变更类型 - [x] ♻️ 重构(既不修复错误也不增加功能的代码变动) - [x] 📦 构建过程或辅助工具的变动 ## 关联的Issue ## 如何测试 1. 增量编译 dflow_runner 目标,确认 libdflow_runner.so 输出到 dflow/runner/ 目录 2. 确认所有 #include 路径正确解析 3. 确认 pre-commit 检查全部通过 ## 核对清单 - [x] 我的代码遵循了项目的代码风格 - [x] 我已对代码进行了自测 - [x] 我已更新了相关的文档 - [x] 我在标题中使用了合适的类型标签(如:feat:, fix:) - [x] 我已经详细阅读了贡献指南(CONTRIBUTING.md),并遵守了其中的所有规定,包括但不限于commit message的格式、无效commit的合并等 ## 其他信息 - 涉及 112 个文件变更(目录 rename + include 路径更新) - 编译验证通过:libdflow_runner.so 正确输出到 cmake-build-gcov/dflow/runner/libdflow_runner.so - 文档同步更新:docs/zh/design/modules/dflow/dflow.md、docs/en/design/modules/dflow/dflow.md、blacklist.txt See merge request: cann/ge!4263 | 18 天前 | |
fix: 修复DFlowInitialize失败不回滚和DFlowFinalize中aclFinalize顺序错误 Co-authored-by: lining23666<lining.li@huawei.com> # message auto-generated for no-merge-commit merge: !4473 merge fix/dflow-init-finalize-rollback-dev into develop fix: 修复DFlowInitialize失败不回滚和DFlowFinalize中aclFinalize顺序错误 Created-by: lining23666 Commit-by: lining23666 Merged-by: cann-robot Description: # Pull Request ## 描述 修复 DFlowInitialize 和 DFlowFinalize 中存在的 4 个问题: 1. **初始化失败无回滚,资源泄漏**:DFlowInitialize 中间步骤失败时(如 PNE SO 加载失败),已初始化的 ACL、SessionManager 不会被清理。用户调 DFlowFinalize 时因 g_dflow_ge_initialized 仍为 false 直接返回,资源泄漏。 2. **aclFinalize 顺序错误(use-after-free)**:DFlowFinalize 中 aclFinalize 在 SessionManager Finalize 之前执行,而 SessionManager Finalize 会触发 GeSession 析构调用 DestroyRtContexts,此时 ACL 已释放,存在 use-after-free 风险。 3. **并发初始化竞态**:DFlowInitialize 无锁保护,并发调用会覆盖 g_dflow_session_manager 指针导致泄漏。 4. **重复 Finalize 不清理**:DFlowFinalize 检查 g_dflow_ge_initialized,初始化失败后该标志为 false,导致 Finalize 跳过清理。 ### 修复方案 - 提取 DFlowFinalizeImpl() 到匿名命名空间,包含完整清理逻辑(ACL finalize 在末尾) - DFlowInitialize 入口加 g_dflow_ge_release_mutex 锁,失败时调 DFlowFinalizeImpl() 自动回滚 - DFlowFinalize 去掉 g_dflow_ge_initialized 检查,改为无条件幂等清理 - aclFinalize 移到 DFlowFinalizeImpl 末尾,在 SessionManager/PNE 清理之后 ## 变更类型 - [x] 🐛 Bug 修复 ## 关联的Issue ## 如何测试 1. 编译 dflow UT target ut_libge_helper_utest 2. 运行 DFlowInitialize 相关测试用例 ## 核对清单 - [x] 我的代码遵循了项目的代码风格 - [x] 我已对代码进行了自测 - [x] 我已更新了相关的文档 - [x] 我在标题中使用了合适的类型标签(如: feat:, fix:) - [x] 我已经详细阅读了贡献指南(CONTRIBUTING.md),并遵守了其中的所有规定 ## 其他信息 测试结果:10 个相关 UT 全部通过,包括验证回滚路径的 DFlowInitialize_pne_init_failed、验证 ACL 重复初始化兼容的 DFlowInitialize_acl_repeat_init、验证 ACL 失败的 DFlowInitialize_acl_init_failed。 See merge request: cann/ge!4473 | 2 天前 | |
refactor: dflow session/compiler/executor 目录结构调整到 runner 平级目录 Co-authored-by: lining23666<lining.li@huawei.com> # message auto-generated for no-merge-commit merge: !4263 merge dflow into develop refactor: dflow session/compiler/executor 目录结构调整到 runner 平级目录 Created-by: lining23666 Commit-by: lining23666 Merged-by: cann-robot Description: ## 描述 将 dflow 的 session、compiler、executor 三个目录统一移入 dflow/runner/ 下,使 session 与 compiler、executor 处于平行层级。编译产物 libdflow_runner.so 输出到 dflow/runner/ 目录,目录结构与编译结果对应。 **调整前**: dflow/ ├── compiler/ ← 编译层(含 session 子目录) │ ├── CMakeLists.txt ← dflow_runner 编译定义 │ ├── data_flow_graph/ │ ├── model/ │ ├── pne/ │ └── session/ ← session 原在此 ├── executor/ ← 执行层 ├── deployer/ ├── ... **调整后**: dflow/ ├── runner/ ← 新建,dflow_runner 编译入口 │ ├── CMakeLists.txt ← dflow_runner 编译定义 │ ├── compiler/ ← 编译层 │ ├── executor/ ← 执行层 │ └── session/ ← session 层(与 compiler/executor 平级) ├── deployer/ ├── ... ## 变更类型 - [x] ♻️ 重构(既不修复错误也不增加功能的代码变动) - [x] 📦 构建过程或辅助工具的变动 ## 关联的Issue ## 如何测试 1. 增量编译 dflow_runner 目标,确认 libdflow_runner.so 输出到 dflow/runner/ 目录 2. 确认所有 #include 路径正确解析 3. 确认 pre-commit 检查全部通过 ## 核对清单 - [x] 我的代码遵循了项目的代码风格 - [x] 我已对代码进行了自测 - [x] 我已更新了相关的文档 - [x] 我在标题中使用了合适的类型标签(如:feat:, fix:) - [x] 我已经详细阅读了贡献指南(CONTRIBUTING.md),并遵守了其中的所有规定,包括但不限于commit message的格式、无效commit的合并等 ## 其他信息 - 涉及 112 个文件变更(目录 rename + include 路径更新) - 编译验证通过:libdflow_runner.so 正确输出到 cmake-build-gcov/dflow/runner/libdflow_runner.so - 文档同步更新:docs/zh/design/modules/dflow/dflow.md、docs/en/design/modules/dflow/dflow.md、blacklist.txt See merge request: cann/ge!4263 | 18 天前 |