| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
fix: 修复dflow非0卡部署context校验失败并保证API层context透明 Co-authored-by: lining23666<lining.li@huawei.com> # message auto-generated for no-merge-commit merge: !4697 merge fix/dflow-context-transparent into develop fix: 修复dflow非0卡部署context校验失败并保证API层context透明 Created-by: lining23666 Commit-by: lining23666 Merged-by: cann-robot Description: # Pull Request ## 描述 修复 dflow 部署模型到非 0 卡时加载失败的问题,并保证 dflow API 对调用线程 runtime context 的透明性。包含两个配套修改: **1. SubmitEventSync 入口绑卡(dflow/deployer/common/data_flow/event/proxy_event_manager.cc)** 根因:runtime context 是线程私有的, ProxyEventManager::SubmitEventSync 会在部署线程池工作线程(ge_dpl_ldlm 加载子模型线程等)中调用 rtEschedSubmitEventSync,而该线程从未执行过 aclrtSetDevice,报 EE1018: No valid context is bound to the current thread。部署 0 卡时命中 runtime 默认 context 侥幸通过,非 0 卡(如 numa_config 仅配置 2/3/4/5 卡)必现。 修复:SubmitEventSync 入口统一 aclrtSetDevice(device_id),单点覆盖全部 6 类远程内存组事件(CreateGroup/AddGroup/AllocCache/AllocMbuf/FreeMbuf/CopyQMbuf),与库内 DestroyQueue、UnloadSubmodels 既有做法一致。该路径仅在部署期和变量同步期调用,不在推理热路径。 **2. dflow API 入口 context save/restore(dflow/runner/session/dflow_api.cc)** 背景:内部路径(如 feed 的 io_helper)会在 API 调用线程上 SetDevice 并残留切换,污染调用方(如 torch_npu 用户主线程)的 context。 修复:API 层新增 RtCtxGuard(RAII),入口记录调用线程 context,出口恢复,使内部设备/context 切换对调用方透明: - 无 context 或未变化时零动作(避免恢复已销毁 context 失败的场景,如 Finalize 内部 aclrtResetDevice 后) - 构造/析构均容忍失败,restore 失败仅打警告 - 覆盖全部 16 个 API 入口 两个修改配合形成完整方案:内部各依赖 context 的调用点用前自行绑卡(可自由切换),API 层对调用方上下文透明。 ## 变更类型 - [x] 🐛 Bug 修复 - [ ] ✨ 新功能 - [ ] 💄 代码风格更新(格式化,局部变量) - [ ] ♻️ 重构(既不修复错误也不增加功能的代码变动) - [ ] 📦 构建过程或辅助工具的变动 - [ ] 📝 文档内容更新 ## 关联的Issue ## 如何测试 1. 复现:numa_config.json 的 item_list 仅配置 2、3、4、5 卡,运行 examples/dflow/python/sample_npu_model.py,部署到物理 2 卡时报 EE1018 context null,模型加载失败 2. 修复后验证:同配置重跑上述样例,模型加载成功、feed/fetch 正常 3. context 透明性验证:feed 前后检查调用线程的当前 context/device 不变(torch_npu 混用场景) 4. 回归:本地增量编译 dflow(model_deployer、dflow_runner 目标)通过;pre-commit 全部通过 ## 核对清单 - [x] 我的代码遵循了项目的代码风格 - [x] 我已对代码进行了自测 - [x] 我已更新了相关的文档 - [x] 我在标题中使用了合适的类型标签(如:feat:, fix:) - [x] 我已经详细阅读了贡献指南(CONTRIBUTING.md),并遵守了其中的所有规定,包括但不限于commit message的格式、无效commit的合并等 ## 其他信息 本 PR 为草稿状态,真机验证进行中,完成后转正式。 See merge request: cann/ge!4697 | 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 | 1 个月前 | |
fix: improve log usability Co-authored-by: m0_50621083<hongyuecheng@huawei.com> # message auto-generated for no-merge-commit merge: !4556 merge CANN-log-evaluation-develop into develop fix: improve log usability Created-by: m0_50621083 Commit-by: m0_50621083 Merged-by: cann-robot Description: # Pull Request ## 描述 本次修改针对 GE 代码中的日志易用性问题进行整改,主要包括: - 修复日志中的英文拼写及语法问题; - 优化日志提示语义和表达; - 补充部分日志中的单位及上下文信息; - 统一部分日志及注释的英文表达; - 优化个别不规范的日志输出方式。 本次修改主要涉及日志和提示文本,不改变核心功能逻辑。 ## 变更类型 请选择本次引入的变更类型: <!-- [x] 表示选中 --> - [x] 🐛 Bug 修复 - [ ] ✨ 新功能 - [ ] 💄 代码风格更新(格式化,局部变量) - [ ] ♻️ 重构(既不修复错误也不增加功能的代码变动) - [ ] 📦 构建过程或辅助工具的变动 - [ ] 📝 文档内容更新 ## 关联的Issue 无关联Issue <!-- 如果这个PR是为了解决特定的Issue,请在当前页面的右侧'关联Issue'部分添加相应Issue链接,并勾选'合并后关闭已关联的 Issue'选项。 --> ## 如何测试 描述测试此变更的步骤和前提条件: 1. 使用 git diff 对本次修改内容进行检查,确认修改范围均属于日志易用性整改。 2. 使用 git diff --check 检查代码格式,确认不存在 trailing whitespace 等格式问题。 3. 检查日志字符串修改前后的参数及格式化占位符,确认日志参数与原有逻辑保持一致。 4. 确认本次修改主要涉及日志、提示信息及相关文本,不影响原有核心功能逻辑。 ## 核对清单 <!-- [x] 表示选中 --> - [x] 我的代码遵循了项目的代码风格 - [x] 我已对代码进行了自测 - [ ] 我已更新了相关的文档 - [x] 我在标题中使用了合适的类型标签(如: feat:, fix:) - [ ] 我已经详细阅读了贡献指南(CONTRIBUTING.md),并遵守了其中的所有规定,包括但不限于commit message的格式、无效commit的合并等 ## 其他信息 本次为日志易用性专项整改,修改范围涉及多个模块,主要针对现有日志中的拼写、语法、语义表达、单位信息以及日志输出规范进行优化。 相关修改不涉及对外接口变更,不改变现有业务流程及核心功能逻辑。 See merge request: cann/ge!4556 | 8 天前 | |
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 个月前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 5 天前 | ||
| 1 个月前 | ||
| 8 天前 | ||
| 1 个月前 | ||
| 1 个月前 | ||
| 1 个月前 |