A regression since ae8510e1015: GPU devices (such as CUDA, OpenCL,
OptiX) will include CPU devices as well since this is how hybrid
rendering works.
Restructure code a bit so that an additional check for the device
type returned by _cycles.available_devices().