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

#### 产品支持情况

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


#### 功能说明

复位一个Event。用户需确保等待Stream中的任务都完成后，再复位Event，异步接口。


#### 函数原型

- C函数原型
  1 aclError aclrtResetEvent(aclrtEvent event, aclrtStream stream)

- python函数
  1 ret = acl.rt.reset_event(event, stream)


#### 参数说明

| 参数名 | 说明 |
| --- | --- |
| event | int，待复位的Event对象的指针地址。 |
| stream | int，指定Event所在的Stream的对象指针地址。 |


#### 返回值说明

| 返回值 | 说明 |
| --- | --- |
| ret | int，错误码，返回0表示成功，返回其它值表示失败。 |


#### 约束说明

仅支持复位由acl.rt.create_event_with_flag接口创建的、带有ACL_EVENT_SYNC标志的Event。

注意，在多个Stream中的任务需要等待同一个Event的情况下，不建议调用此接口来复位Event。如图所示，如果在stream2中的aclrtStreamWaitEvent接口之后调用aclrtResetEvent接口，Event将被复位，这会导致stream3中的aclrtStreamWaitEvent接口无法成功。
