Skip to contents

Returns the device on which a tensor is allocated.

Usage

device(x, ...)

Arguments

x

(tensorish)
A tensor-like object.

...

Additional arguments passed to methods (unused).

Value

PJRTDevice

Details

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

Examples

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