Constants

The following constants are defined in dpctl:

dpctl.device_type = <enum 'device_type'>[source]

An enum.Enum of supported SYCL device types.

all
accelerator
automatic
cpu
custom
gpu
Example:
import dpctl

# filter GPU devices amongst available SYCL devices
gpu_devs = [
    d for d in dpctl.get_devices() if (
        d.device_type == dpctl.device_type.gpu
    ) ]

# alternatively, get GPU devices directly
gpu_devs2 = dpctl.get_devices(device_type=dpctl.device_type.gpu)
dpctl.backend_type = <enum 'backend_type'>[source]

An enum.Enum of supported SYCL backends.

all
cuda
hip
level_zero
opencl
Example:
import dpctl

# create a SYCL device with OpenCL backend using filter selector
d = dpctl.SyclDevice("opencl")
d.backend
# Possible output: <backend_type.opencl: 5>
dpctl.event_status_type = <enum 'event_status_type'>[source]

An enum.Enum of SYCL event states.

unknown_status
submitted
running
complete
Example:
import dpctl
ev = dpctl.SyclEvent()
ev.execution_status
# Possible output: <event_status_type.complete: 4>
dpctl.global_mem_cache_type = <enum 'global_mem_cache_type'>[source]

An enum.Enum of global memory cache types for a device.

indeterminate
none
read_only
read_write
Example:
import dpctl
dev = dpctl.SyclDevice()
dev.global_mem_cache_type
# Possible output: <global_mem_cache_type.read_write: 4>