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

#### 产品支持情况

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


#### 功能说明

获取指定Event的ID。


#### 函数原型

- C函数原型

```
aclError aclrtGetEventId(aclrtEvent event, uint32_t *eventId)
```


- python函数
  1 event_id, ret = acl.rt.get_event_id(event)


#### 参数说明

| 参数名 | 说明 |
| --- | --- |
| event | int，指定要查询的Event。 |


#### 返回值说明

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