migrate detect_cpu