Skip to contents

Get device associated with an MLX object

Usage

mlx_device(x)

Arguments

x

An mlx array, or an R array/matrix/vector that will be converted via as_mlx().

Value

"gpu" or "cpu".

Examples

x <- as_mlx(1:10)
mlx_device(x)
#> [1] "gpu"