SetGraphFixedFeatureMemoryBaseWithType

函数功能

用于指定图的不同内存类型的Fixed Feature内存基地址,内存大小从GetCompiledGraphSummary>GetAllFeatureMemoryTypeSize接口中获取。Feature内存指的是模型执行过程中所需要的中间内存(比如中间节点的输入输出等内存)。

函数原型

1
Status SetGraphFixedFeatureMemoryBaseWithType(uint32_t graph_id, MemoryType type, const void *const memory, size_t size)

参数说明

参数名

输入/输出

描述

graph_id

输入

子图对应的id。

type

输入

内存类型,包含 MemoryType::MEMORY_TYPE_DEFAULT、MemoryType::MEMORY_TYPE_P2P。

memory

输入

设置的Fixed Feature内存基地址。

size

输入

设置的Fixed Feature内存大小。一定要大于等于从GetCompiledGraphSummary>GetAllFeatureMemoryTypeSize接口中获取的。

返回值

参数名

类型

描述

-

Status

SUCCESS:设置成功。

FAILED:设置失败。

约束说明