| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
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 | 1 个月前 | |
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 | 1 个月前 | |
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 | 1 个月前 | |
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 | 1 个月前 | |
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 | 1 个月前 | |
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 | 1 个月前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 1 个月前 | ||
| 1 个月前 | ||
| 1 个月前 | ||
| 1 个月前 | ||
| 1 个月前 | ||
| 1 个月前 |