Skip to content

Commit 5ae872a

Browse files
committed
Docstring for DLDeviceType listing the valid enumerators
1 parent 85d417f commit 5ae872a

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

dpctl/tensor/_usmarray.pyx

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,40 @@ include "_slicing.pxi"
5454

5555

5656
class DLDeviceType(IntEnum):
57+
"""
58+
An ``IntEnum`` for the types of DLDevices supported by the DLPack
59+
protocol.
60+
``kDLCPU``:
61+
CPU (host) device
62+
``kDLCUDA``:
63+
CUDA GPU device
64+
``kDLCUDAHost``:
65+
Pinned CUDA CPU memory by cudaMallocHost
66+
``kDLOpenCL``:
67+
OpenCL device
68+
``kDLVulkan``:
69+
Vulkan buffer
70+
``kDLMetal``:
71+
Metal for Apple GPU
72+
``kDLVPI``:
73+
Verilog simulator buffer
74+
``kDLROCM``:
75+
ROCm GPU device
76+
``kDLROCMHost``:
77+
Pinned ROCm CPU memory allocated by hipMallocHost
78+
``kDLExtDev``:
79+
Reserved extension device type used to test new devices
80+
``kDLCUDAManaged``:
81+
CUDA managed/unified memory allocated by cudaMallocManaged
82+
``kDLOneAPI``:
83+
Unified shared memory allocated on a oneAPI non-partitioned device
84+
``kDLWebGPU``:
85+
Device support for WebGPU standard
86+
``kDLHexagon``:
87+
Qualcomm Hexagon DSP
88+
``kDLMAIA``:
89+
Microsoft MAIA device
90+
"""
5791
kDLCPU = c_dlpack.device_CPU
5892
kDLCUDA = c_dlpack.device_CUDA
5993
kDLCUDAHost = c_dlpack.device_CUDAHost

0 commit comments

Comments
 (0)