CustomAllocateStreamPassFn
产品支持情况
产品  | 
是否支持  | 
|---|---|
√  | 
|
√  | 
|
√  | 
|
√  | 
|
√  | 
|
√  | 
功能说明
注册自定义的逻辑流分配Pass执行函数。
函数原型
1 | PassRegistrationData &CustomAllocateStreamPassFn(const CustomAllocateStreamPassFunc &allocate_stream_pass_fn)  | 
参数说明
参数名  | 
输入/输出  | 
说明  | 
|---|---|---|
allocate_stream_pass_fn  | 
输入  | 
自定义的逻辑流分配函数。详情请参见回调函数CustomAllocateStreamPassFunc。  | 
返回值说明
返回自身对象的引用。
约束说明
无
回调函数CustomAllocateStreamPassFunc
用户自定义并实现CustomAllocateStreamPassFunc类函数,即自定义的逻辑流分配函数。
Status CustomAllocateStreamPassFunc(const ConstGraphPtr &graph, StreamPassContext &stream_context)
参数名  | 
输入/输出  | 
说明  | 
|---|---|---|
graph  | 
输入  | 
待分配逻辑流的图  | 
stream_context  | 
输入  | 
逻辑流分配上下文,可通过该上下文申请新stream id,设置节点的stream id等。详见StreamPassContext结构定义。  | 
-  | 
输出  | 
  | 
父主题: PassRegistrationData