Waits for outstanding operations on the specified device or stream to complete.
Usage
mlx_synchronize(device = mlx_default_device())Arguments
- device
Execution target: supply
"gpu","cpu", or anmlx_streamcreated viamlx_new_stream(). Defaults to the currentmlx_default_device()unless noted otherwise (helpers that act on an existing array typically reuse that array's device or stream).
Examples
x <- mlx_matrix(1:4, 2, 2)
mlx_synchronize("gpu")
stream <- mlx_new_stream()
mlx_synchronize(stream)