Move the CUDA --device parsing to cuda_init()

Tested on OSX and on Bull.