Function: synchronize_device

Description

Blocks app execution until the compute device has completed all preceding requested tasks.

In the multi-device scenario, the device of the current context is waited.

Prototype

  • C Prototype
    1
    aclError aclrtSynchronizeDevice(void)
    
  • Python Function
    1
    ret = acl.rt.synchronize_device()
    

Parameters

None

Return Value

Return Value

Description

ret

Int, error code. 0 on success; else, failure.

Reference