migrate detect_gpu