昇腾社区首页
中文
注册
开发者
下载

GetCompiledGraphSummary

产品支持情况

产品

是否支持

Atlas A3 训练系列产品/Atlas A3 推理系列产品

Atlas A2 训练系列产品/Atlas A2 推理系列产品

Atlas 200I/500 A2 推理产品

x

Atlas 推理系列产品

Atlas 训练系列产品

头文件/库文件

  • 头文件:#include <ge/ge_api.h>
  • 库文件:libge_runner.so

功能说明

查询图编译结果的概要信息。包括Feature内存大小、Const内存大小、Stream、Event数目及内存是否可刷新等信息。

  • 在调用本接口前,必须先调用CompileGraph接口进行图编译。
  • 您可以自行申请内存,再通过如下接口设置或更新Feature内存、Const内存基址:
    • 通过SetGraphConstMemoryBase设置Const内存基址。内存大小从GetCompiledGraphSummary>GetConstMemorySize接口中获取。
    • 通过UpdateGraphFeatureMemoryBase更新Feature内存基址,内存大小从GetCompiledGraphSummary>GetFeatureMemorySize接口中获取。
    • 通过SetGraphFixedFeatureMemoryBase设置Fixed Feature内存基地址,内存大小从GetCompiledGraphSummary>GetFixedFeatureMemorySize接口中获取。
    • 通过SetGraphFixedFeatureMemoryBaseWithType设置图的不同内存类型的Fixed Feature内存基地址,内存大小从GetCompiledGraphSummary>GetAllFeatureMemoryTypeSize接口中获取。
    • 通过UpdateGraphRefreshableFeatureMemoryBase更新除了Fixed之外可刷新的Feature内存基址,内存大小从GetCompiledGraphSummary>GetRefreshableFeatureMemorySize接口中获取。

函数原型

1
CompiledGraphSummaryPtr GetCompiledGraphSummary(uint32_t graph_id)

参数说明

参数名

输入/输出

说明

graph_id

输入

子图对应的ID。

返回值说明

参数名

类型

说明

-

CompiledGraphSummaryPtr

图编译结果的概要信息CompiledGraphSummary的shared_ptr。

约束说明