aclrtSetOpWaitTimeout

Applicability

Product

Supported

Atlas 350 Accelerator Card

Atlas A3 training product/Atlas A3 inference product

Atlas A2 training product/Atlas A2 inference product

Atlas 200I/500 A2 inference product

Atlas inference product

Atlas training product

Description

Sets the timeout interval for waiting for the completion of a specified event.

If this API is not called, no timeout occurs by default. If this API is called multiple times in a process, the last configured interval is used.

Prototype

1
aclError aclrtSetOpWaitTimeout(uint32_t timeout)

Parameters

Parameter

Input/Output

Description

timeout

Input

Timeout interval, in seconds.

The value 0 indicates no timeout.

Returns

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

Restrictions

After initialization by calling aclInit in a process, you can call aclrtSetOpWaitTimeout to set the timeout interval. Tasks delivered by calling aclrtStreamWaitEvent in the process can wait within the configured timeout interval. If the wait time exceeds the configured timeout interval, an error will be returned after a synchronization API (for example, aclrtSynchronizeStream) is called.