CustomAllocateStreamPassFn【免费下载链接】metadefAscend Metadata Definition项目地址: https://gitcode.com/cann/metadefAI处理器支持情况AI处理器类型是否支持Ascend 910C√Ascend 910B√功能说明注册自定义的逻辑流分配Pass执行函数。函数原型PassRegistrationData CustomAllocateStreamPassFn(const CustomAllocateStreamPassFunc allocate_stream_pass_fn)参数说明参数名输入/输出说明allocate_stream_pass_fn输入自定义的逻辑流分配函数。详情请参见回调函数CustomAllocateStreamPassFunc。返回值说明返回自身对象的引用。约束说明无。回调函数CustomAllocateStreamPassFunc用户自定义并实现CustomAllocateStreamPassFunc类函数即自定义的逻辑流分配函数。Status CustomAllocateStreamPassFunc(const ConstGraphPtr graph, StreamPassContext stream_context)表 1参数说明参数名输入/输出说明graph输入待分配逻辑流的图stream_context输入逻辑流分配上下文可通过该上下文申请新stream id设置节点的stream id等。详见StreamPassContext结构定义。-输出SUCCESS成功。其他值失败。【免费下载链接】metadefAscend Metadata Definition项目地址: https://gitcode.com/cann/metadef创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考