---
title: 函数：get_stream_available_num
description: "| 产品 | 是否支持 |"
url: https://www.hiascend.com/document/detail/zh/CANNCommunityEdition/latest/API/runtimeapi/aclpythondevg_01_1039.html
sourcePath: /source/zh/CANNCommunityEdition/920beta1/API/runtimeapi/aclpythondevg_01_1039.html
indexId: b9df2f41de7becd3b9504fad5c8cdd7d61afdf861393de3f23a4fa86dd524f5782
---
# 函数：get_stream_available_num

#### 产品支持情况

| 产品 | 是否支持 |
| --- | --- |
| Ascend 950PR / Ascend 950DT | √ |
| Atlas A3 训练系列产品 / Atlas A3 推理系列产品 | √ |
| Atlas A2 训练系列产品 / Atlas A2 推理系列产品 | √ |
| Atlas 训练系列产品 | √ |
| Atlas 推理系列产品 | √ |
| Atlas 200I/500 A2 推理产品 | √ |


#### 功能说明

获取当前Device上剩余可用的Stream数量。


#### 函数原型

- C函数原型
  1 aclError aclrtGetStreamAvailableNum(uint32_t *streamCount)

- python函数
  1 stream_count, ret = acl.rt.get_stream_available_num()


#### 参数说明

无


#### 返回值说明

| 返回值 | 说明 |
| --- | --- |
| stream\_count | int，剩余可用的Stream数量。 |
| ret | int，返回0表示成功，返回其他值表示失败。 |
