---
title: SetAttachedStreamInfos
description: "为当前算子附着一组Stream信息，用于指定该算子在哪个执行流（Stream）上运行。"
url: https://www.hiascend.com/document/detail/zh/canncommercial/latest/maintenref/basicdataapi/atlasopapi_07_00695.html
sourcePath: /source/zh/canncommercial/900/maintenref/basicdataapi/atlasopapi_07_00695.html
indexId: 91b54c6baf4744f58b6165da4a92315e169044297495b27cac5356798cbc7f3f78
---
# SetAttachedStreamInfos

#### 函数功能

为当前算子附着一组Stream信息，用于指定该算子在哪个执行流（Stream）上运行。


#### 函数原型

```
ge::graphStatus SetAttachedStreamInfos(std::vector<StreamInfo> &stream_info_vec) const
```


#### 参数说明

| 参数 | 输入/输出 | 说明 |
| --- | --- | --- |
| stream\_info\_vec | 输入 | 执行流信息。std::vector<StreamInfo>类型。 |


#### 返回值说明

返回graphStatus状态码。


#### 约束说明

无


#### 调用示例

```
ge::graphStatus SetAttachedStreamInfos(ExeResGenerationContext* context) {
  std::vector<StreamInfo> stream_info_vec;
  auto status = context->SetAttachedStreamInfos(stream_info_vec);
}
```
