Function: query_event
Applicable Products
- Ascend 950PR&950DT products: Supported
- Atlas A3 products: Supported
- Atlas A2 products: Supported
- Atlas 200I/500 A2 inference products: Supported
- Atlas inference products: Supported
- Atlas training products: Supported
Function
Queries whether the events recorded by acl.rt.record_event in the same thread as this API are executed.
NOTICE This API will be deprecated in future releases. Use Function: query_event_status instead.
Prototype
-
C Prototype
aclError aclrtQueryEvent(aclrtEvent event, aclrtEventStatus *status) -
Python Function
status, ret = acl.rt.query_event(event)
Parameters
| Parameter | Description |
|---|---|
| event | Int, pointer address of the event object to be queried. |
Return Values
| Return Value | Description |
|---|---|
| status | Int, pointer address of the event status.ACL_EVENT_STATUS_COMPLETE = 0: The event recorded in the stream is successfully executed.ACL_EVENT_STATUS_NOT_READY = 1: The event is not recorded in the stream, or the event recorded in the stream is not executed or fails to be executed. |
| ret | Int, error code. If 0 is returned, the operation is successful. If other values are returned, the operation fails. |