First tries cuda, then cpu.
auto_device(device = NULL)
device
(character(1)) The device. If not NULL, is returned as is.
character(1)
NULL