Separate canDetectGpus and findGpus futher, and fix tests