Skip to contents

Returns the device on which an array is allocated.

Usage

device(x, ...)

Arguments

x

(arrayish)
An array-like object.

...

Additional arguments passed to methods (unused).

Value

PJRTDevice

Details

This is implemented via the generic tengen::device().

Examples

x <- nv_array(1:4, dtype = "f32")
device(x)
#> <CpuDevice(id=0)>