def current_device(): """Returns the index of a currently selected device.""" _lazy_init() return torch._C._cuda_getDevice()