dpctl.get_num_devices¶
- dpctl.get_num_devices(backend=backend_type.all, device_type=device_type.all)¶
A helper function to return the number of SYCL devices of a given
dpctl.device_typeanddpctl.backend_type.- Parameters:
backend (str,
dpctl.backend_type, optional) – Adpctl.backend_typeenum value or a string that specifies a SYCL backend. Currently, accepted values are: “cuda”, “hip”, “opencl”, “level_zero”, or “all”. Default:dpctl.backend_type.all.device_type (str,
dpctl.device_type, optional) – Adpctl.device_typeenum value or a string that specifies a SYCL device type. Currently, accepted values are: “gpu”, “cpu”, “accelerator”, or “all”. Default:dpctl.device_type.all.
- Returns:
The number of available SYCL devices that satisfy the provided
dpctl.backend_typeanddpctl.device_typevalues.- Return type: