Function: synchronize_stream_with_timeout

C Prototype

aclError aclrtSynchronizeStreamWithTimeout(aclrtStream stream, int32_t timeout)

Python Function

ret = acl.rt.synchronize_stream_with_timeout(stream, timeout)

Function Usage

Blocks app running until all tasks in the specified stream are complete. This API is enhanced based on acl.rt.synchronize_stream and allows you to set the timeout interval for your app.

Input Description

stream: int, pointer address of the stream object that needs to complete all tasks.

timeout: int, API timeout interval. The options are as follows:

Return Value

ret: int, error code.

Restrictions

None