aclrtSynchronizeDeviceWithTimeout
Applicability
Product |
Supported |
|---|---|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
Description
Blocks the current thread until the device corresponding to the context bound to the current thread completes the computation. This API is enhanced based on aclrtSynchronizeDevice and allows users to set the timeout interval. When an app is abnormal, the app automatically exits based on the configured timeout interval. When the app exits due to timeout, ACL_ERROR_RT_STREAM_SYNC_TIMEOUT is returned.
Prototype
aclError aclrtSynchronizeDeviceWithTimeout(int32_t timeout)
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
timeout |
Input |
API timeout interval. The options are as follows:
|
Returns
0 on success; else, failure. For details, see aclError.