aclrtStreamWaitEventWithTimeout

Applicability

Product

Supported

Atlas A3 training products/Atlas A3 inference products

Atlas A2 training products/Atlas A2 inference products

Atlas 200I/500 A2 inference products

Atlas inference products

Atlas training products

Description

Blocks the specified stream until the specified event is complete. This API is asynchronous.

This interface is enhanced based on the aclrtStreamWaitEvent interface and allows users to configure the timeout interval.

Prototype

aclError aclrtStreamWaitEventWithTimeout(aclrtStream stream, aclrtEvent event, int32_t timeout)

Parameters

Parameter

Input/Output

Description

stream

Input

Stream.

For stream synchronization, for example, Stream2 waits for Stream1, set this parameter to Stream2.

To use the default stream, pass NULL.

event

Input

Event to wait on.

timeout

Input

Timeout interval.

> 0: specific timeout, in ms.

Returns

0 on success; else, failure. For details, see aclError.