Function: synchronize_device
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
Blocks app execution until the compute device has completed all preceding requested tasks.
If there are multiple devices, this API is called to wait for the device corresponding to the current context.
Prototype
-
C Prototype
aclError aclrtSynchronizeDevice(void) -
Python Function
ret = acl.rt.synchronize_device()
Parameters
None
Return Values
| Return Value | Description |
|---|---|
| ret | Int, error code. If 0 is returned, the operation is successful. If other values are returned, the operation fails. |