已合并
feat(om2): 支持host tensor H2D/D2H并优化model_executor体积 #4389
wuzheng创建于 17 天前
feat(om2): 支持host tensor H2D/D2H并优化model_executor体积 #4389
已合并
Pull Request已成功合入, 合并人@CANN-robot
(感谢 wuzheng 的贡献)此处折叠了91条消息 查看更多
GengChao
17 天前 评论:
17 天前 评论:
/lgtm


17 天前 添加了label:lgtm
yangyongqiang
16 天前 评论:
16 天前 评论:
/approve


16 天前 添加了label:approved
16 天前 合入了pull request
Pull Request
描述
支持 OM2 在线场景下 host tensor 的 H2D/D2H 拷贝,并对 model_executor 进行体积优化,确保 libge_executor.so 不超限。
主要变更:
LoadOm2Graph添加SetDevice,RunOm2Graph支持 host input/output 的 H2D/D2H 拷贝om2_graph_to_model_map_和om2_map_mutex_,改用GeRootModel存储 model_id(与 OM1 设计一致)DoReleaseModel,直接调用ReleaseMemoryUnloadGraph,去掉冗余的graph_node查找RunModel中冗余的 executor nullptr 检查RunThread中is_continue死代码graph_executor.h中未使用的SyncExecuteModelFunc/AsyncExecuteModelFunc类型别名体积影响:libge_executor.so 与基线持平(0 bytes 增量)
变更类型
关联的Issue
如何测试
model_executor_unittesttest_om2_online核对清单
其他信息
本次变更基于 commit
0ebf3107d。