Constants¶
The following constants are defined in dpctl:
- dpctl.device_type = <enum 'device_type'>[source]¶
An
enum.Enumof supported SYCL device types.allacceleratorautomaticcpucustomgpu- 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.Enumof supported SYCL backends.allcudahiplevel_zeroopencl- 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>