I have multiple AMD Radeon GPUs (of the same model) on Linux. I'd like to be able to uniquely identify them, so that if I swap them between PCIe slots, or even between machines, I'll know which one is which without tracking them physically.
Is it possible to get a unique ID (e.g. the serial number) of a GPU on Linux? lspci, dmidecode and /sys/bus/pci/devices/0000:nn:00.0/ don't seem to give anything useful for this purpose. I could also insert an unique ID into the empty space of the BIOS image, but doing so will likely void the warranty.
I'm aware of the similar question, but mine is on Linux and I can use any unique IDs, not just the serial number.