Skip to contents

By default MLX computations are lazy. mlx_eval(x) forces the computations behind x to run. You can do the same by calling (e.g.) as.matrix(x).

Usage

mlx_eval(x)

Arguments

x

An mlx array.

Value

The input object, invisibly.

See also

Examples

system.time(x <- mlx_rand_normal(1e7))
#>    user  system elapsed 
#>       0       0       0 
system.time(mlx_eval(x))
#>    user  system elapsed 
#>   0.003   0.004   0.080