Constants¶
The following constants are defined in dpctl.tensor
:
- dpctl.tensor.DLDeviceType = <enum 'DLDeviceType'>¶
An
enum.IntEnum
for the types of DLDevices supported by the DLPack protocol.kDLCPU
:CPU (host) device
kDLCUDA
:CUDA GPU device
kDLCUDAHost
:Pinned CUDA CPU memory by cudaMallocHost
kDLOpenCL
:OpenCL device
kDLVulkan
:Vulkan buffer
kDLMetal
:Metal for Apple GPU
kDLVPI
:Verilog simulator buffer
kDLROCM
:ROCm GPU device
kDLROCMHost
:Pinned ROCm CPU memory allocated by hipMallocHost
kDLExtDev
:Reserved extension device type used to test new devices
kDLCUDAManaged
:CUDA managed/unified memory allocated by cudaMallocManaged
kDLOneAPI
:Unified shared memory allocated on a oneAPI non-partitioned device
kDLWebGPU
:Device support for WebGPU standard
kDLHexagon
:Qualcomm Hexagon DSP
kDLMAIA
:Microsoft MAIA device
- dpctl.tensor.e¶
float
:IEEE 754 floating-point representation of Euler’s constant.
- dpctl.tensor.inf¶
float
:IEEE 754 floating-point representation of (positive) infinity.
- dpctl.tensor.nan¶
float
:IEEE 754 floating-point representation of Not a Number (NaN).
- dpctl.tensor.newaxis¶
NoneType
:Alias for
None
which is useful for indexing.
- dpctl.tensor.pi¶
float
:IEEE 754 floating-point representation of the mathematical constant π.