Get total hardware memory, a multiple of 1Gb

nvidia-smi in Linux, for RTX 2060, outputs total memory = 5934 MiB = 5.79 Gb.

Is there a way to read the actual 6Gb value somewhere (for GPU model identification?)
Or are there several values that would add up to 6Gb?
The obvious hack is to ceil the 5.79, but I’m looking for better understanding.

Please be aware of the differences between
kiB/kB
MiB/MB
GiB/GB
Some of the vmem is always used by internal stuff like vbios which can’t be read and differs between driver versions/brands/whatever.

Okay, so I guess the total hardware memory (a multiple of 1Gb) size is only fully determined by PCI Device ID. This is the sure way.

Storing and updating a table like this:

(which the driver must be doing) is impractical.

On Windows 10 with driver 461.09, nvidia-smi shows total memory as a multiple of 1Gb:
RTX 2060 - 6144 MiB
GTX 1080 - 8192 MiB
and so on.

But on Linux it reports a little less memory. Weird.

nvidia-settings displays the installed memory.