CustomAllocateStreamPassFn
AI处理器支持情况
功能说明
注册自定义的逻辑流分配Pass执行函数。
函数原型
PassRegistrationData &CustomAllocateStreamPassFn(const CustomAllocateStreamPassFunc &allocate_stream_pass_fn)
参数说明
自定义的逻辑流分配函数。详情请参见回调函数CustomAllocateStreamPassFunc。 |
返回值说明
返回自身对象的引用。
约束说明
无。
回调函数CustomAllocateStreamPassFunc
用户自定义并实现CustomAllocateStreamPassFunc类函数,即自定义的逻辑流分配函数。
Status CustomAllocateStreamPassFunc(const ConstGraphPtr &graph, StreamPassContext &stream_context)
表 1 参数说明
逻辑流分配上下文,可通过该上下文申请新stream id,设置节点的stream id等。详见StreamPassContext结构定义。 |
||
|