---
title: 函数：get_event_avail_num
description: "| 产品 | 是否支持 |"
url: https://www.hiascend.com/document/detail/zh/canncommercial/latest/API/runtimeapi/aclpythondevg_01_1044.html
sourcePath: /source/zh/canncommercial/900/API/runtimeapi/aclpythondevg_01_1044.html
indexId: 6e3371690888ae00543200b1fdfe8ea72a1d53897ddbf903d086ed432373a2a471
---
# 函数：get_event_avail_num

#### 产品支持情况

| 产品 | 是否支持 |
| --- | --- |
| Atlas 350 加速卡 | √ |
| Atlas A3 训练系列产品 / Atlas A3 推理系列产品 | √ |
| Atlas A2 训练系列产品 / Atlas A2 推理系列产品 | √ |
| Atlas 训练系列产品 | √ |
| Atlas 推理系列产品 | √ |
| Atlas 200I/500 A2 推理产品 | √ |


#### 功能说明

查询当前Device上可用的Event数量。


#### 函数原型

- C函数原型

```
aclError aclrtGetEventAvailNum(uint32_t *eventCount)
```


- python函数
  1 event_count, ret = acl.rt.get_event_avail_num()


#### 参数说明

无


#### 返回值说明

| 返回值 | 说明 |
| --- | --- |
| event\_count | int，Event数量。 |
| ret | int，返回0表示成功，返回其他值表示失败。 |
