已合并
feat(om2): 支持host tensor H2D/D2H并优化model_executor体积 #4389
wuzheng创建于 17 天前
feat(om2): 支持host tensor H2D/D2H并优化model_executor体积 #4389
已合并
wuzheng创建于 17 天前
wuzheng成员
17 天前

Pull Request

描述

支持 OM2 在线场景下 host tensor 的 H2D/D2H 拷贝,并对 model_executor 进行体积优化,确保 libge_executor.so 不超限。

主要变更:

  • 加回 host tensor 支持:LoadOm2Graph 添加 SetDeviceRunOm2Graph 支持 host input/output 的 H2D/D2H 拷贝
  • 消除 om2_graph_to_model_map_om2_map_mutex_,改用 GeRootModel 存储 model_id(与 OM1 设计一致)
  • 内联 DoReleaseModel,直接调用 ReleaseMemory
  • 简化 UnloadGraph,去掉冗余的 graph_node 查找
  • 删除 RunModel 中冗余的 executor nullptr 检查
  • 删除 RunThreadis_continue 死代码
  • 删除 graph_executor.h 中未使用的 SyncExecuteModelFunc/AsyncExecuteModelFunc 类型别名
  • 更新 UT/ST 测试用例适配新接口

体积影响:libge_executor.so 与基线持平(0 bytes 增量)

变更类型

关联的Issue

如何测试

  1. 运行 UT 用例:model_executor_unittest
  2. 运行 ST 用例:test_om2_online
  3. 验证 libge_executor.so 大小不超过基线

核对清单

其他信息

本次变更基于 commit 0ebf3107d

likedislike
Pull Request已成功合入, 合并人@CANN-robot
(感谢 wuzheng 的贡献)
Wwuzheng成员
17 天前 创建了 pull request,commit eea4da6e
wuzheng成员
17 天前 评论:

/ci

likedislike
Wwuzheng成员
17 天前 update merge request[project id: 8824148, iid: 4389, commit_id: 30cdf9b834387f227d05bc0f5a011159f31491ad] virtual merging success
Wwuzheng成员
17 天前 强制推送  10 个提交:eea4da6e-9 commits from branch develop575fa559-feat(om2): 支持host tensor H2D/D2H并优化model_executor体积
Wwuzheng成员
17 天前 update merge request[project id: 8824148, iid: 4389, commit_id: 16f9e3252b8d0d749eada4538c2b9bd9fcfc3c9c] virtual merging success
此处折叠了91条消息 查看更多
GengChao
GengChao成员
17 天前 评论:

/lgtm

likedislike
CANN-robotCANN-robot成员
17 天前 添加了label:lgtm
yangyongqiang
yangyongqiang成员
16 天前 评论:

/approve

likedislike
CANN-robotCANN-robot成员
16 天前 添加了label:approved
CANN-robotCANN-robot成员
16 天前 合入了pull request