Returns the device on which a tensor is allocated.
Arguments
- x
(
tensorish)
A tensor-like object.- ...
Additional arguments passed to methods (unused).
Details
This is implemented via the generic tengen::device().
Examples
x <- nv_tensor(1:4, dtype = "f32")
device(x)
#> <CpuDevice(id=0)>