__dlpack_device__

array.__dlpack_device__() Tuple[Enum, int]

Returns device type and device ID in DLPack format. Meant for use within from_dlpack().

Parameters:

self (array) – array instance.

Returns:

device (Tuple[Enum, int]) – a tuple (device_type, device_id) in DLPack format. Valid device type enum members are:

CPU = 1
CUDA = 2
CPU_PINNED = 3
OPENCL = 4
VULKAN = 7
METAL = 8
VPI = 9
ROCM = 10