Get or set current MLX device
Examples
mlx_device() # Get current device
#> [1] "gpu"
mlx_device("cpu") # Set to CPU
#> [1] "cpu"
if (mlx_has_gpu()) {
mlx_device("gpu") # Set back to GPU
mlx_device()
}
#> [1] "gpu"
mlx_device("cpu")
#> [1] "cpu"