Device id in nvidia-smi and nvidia-settings

I understand that the device id in nvidia-smi is assigned by the order of pci bus id. What about it in nvidia-settings command?
Appreciate your input.